By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1194
Collapse All | Expand All

(-)a/admin/libtool.m4.in (-729 / +1227 lines)
Lines 1-28 Link Here
1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
2
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3
## Free Software Foundation, Inc.
3
## Free Software Foundation, Inc.
4
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5
##
5
##
6
## This program is free software; you can redistribute it and/or modify
6
## This file is free software; the Free Software Foundation gives
7
## it under the terms of the GNU General Public License as published by
7
## unlimited permission to copy and/or distribute it, with or without
8
## the Free Software Foundation; either version 2 of the License, or
8
## modifications, as long as this notice is preserved.
9
## (at your option) any later version.
10
##
11
## This program is distributed in the hope that it will be useful, but
12
## WITHOUT ANY WARRANTY; without even the implied warranty of
13
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
## General Public License for more details.
15
##
16
## You should have received a copy of the GNU General Public License
17
## along with this program; if not, write to the Free Software
18
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
##
20
## As a special exception to the GNU General Public License, if you
21
## distribute this file as part of a program that contains a
22
## configuration script generated by Autoconf, you may include it under
23
## the same distribution terms that you use for the rest of that program.
24
9
25
# serial 47 AC_PROG_LIBTOOL
10
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
26
11
27
12
28
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
13
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
Lines 82-88 Link Here
82
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
67
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
83
68
84
# Always use our own libtool.
69
# Always use our own libtool.
85
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
70
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
86
AC_SUBST(LIBTOOL)dnl
71
AC_SUBST(LIBTOOL)dnl
87
72
88
# Prevent multiple expansion
73
# Prevent multiple expansion
Lines 132-138 Link Here
132
117
133
# Sed substitution that helps us do robust quoting.  It backslashifies
118
# Sed substitution that helps us do robust quoting.  It backslashifies
134
# metacharacters that are still active within double-quoted strings.
119
# metacharacters that are still active within double-quoted strings.
135
Xsed='sed -e s/^X//'
120
Xsed='sed -e 1s/^X//'
136
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
121
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
137
122
138
# Same as above, but do not quote variable references.
123
# Same as above, but do not quote variable references.
Lines 152-158 Link Here
152
default_ofile=libtool
137
default_ofile=libtool
153
can_build_shared=yes
138
can_build_shared=yes
154
139
155
# All known linkers require a `.a' archive for static linking (except M$VC,
140
# All known linkers require a `.a' archive for static linking (except MSVC,
156
# which needs '.lib').
141
# which needs '.lib').
157
libext=a
142
libext=a
158
ltmain="$ac_aux_dir/ltmain.sh"
143
ltmain="$ac_aux_dir/ltmain.sh"
Lines 172-177 Link Here
172
test -z "$AS" && AS=as
157
test -z "$AS" && AS=as
173
test -z "$CC" && CC=cc
158
test -z "$CC" && CC=cc
174
test -z "$LTCC" && LTCC=$CC
159
test -z "$LTCC" && LTCC=$CC
160
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
175
test -z "$DLLTOOL" && DLLTOOL=dlltool
161
test -z "$DLLTOOL" && DLLTOOL=dlltool
176
test -z "$LD" && LD=ld
162
test -z "$LD" && LD=ld
177
test -z "$LN_S" && LN_S="ln -s"
163
test -z "$LN_S" && LN_S="ln -s"
Lines 191-205 Link Here
191
if test -n "$RANLIB"; then
177
if test -n "$RANLIB"; then
192
  case $host_os in
178
  case $host_os in
193
  openbsd*)
179
  openbsd*)
194
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
180
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
195
    ;;
181
    ;;
196
  *)
182
  *)
197
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
183
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
198
    ;;
184
    ;;
199
  esac
185
  esac
200
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
186
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
201
fi
187
fi
202
188
189
_LT_CC_BASENAME([$compiler])
190
203
# Only perform the check for file, if the check method requires it
191
# Only perform the check for file, if the check method requires it
204
case $deplibs_check_method in
192
case $deplibs_check_method in
205
file_magic*)
193
file_magic*)
Lines 240-250 Link Here
240
# If no C compiler was specified, use CC.
228
# If no C compiler was specified, use CC.
241
LTCC=${LTCC-"$CC"}
229
LTCC=${LTCC-"$CC"}
242
230
231
# If no C compiler flags were specified, use CFLAGS.
232
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
233
243
# Allow CC to be a program name with arguments.
234
# Allow CC to be a program name with arguments.
244
compiler=$CC
235
compiler=$CC
245
])# _LT_AC_SYS_COMPILER
236
])# _LT_AC_SYS_COMPILER
246
237
247
238
239
# _LT_CC_BASENAME(CC)
240
# -------------------
241
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
242
AC_DEFUN([_LT_CC_BASENAME],
243
[for cc_temp in $1""; do
244
  case $cc_temp in
245
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
246
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
247
    \-*) ;;
248
    *) break;;
249
  esac
250
done
251
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
252
])
253
254
255
# _LT_COMPILER_BOILERPLATE
256
# ------------------------
257
# Check for compiler boilerplate output or warnings with
258
# the simple compiler test code.
259
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
260
[ac_outfile=conftest.$ac_objext
261
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
262
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
263
_lt_compiler_boilerplate=`cat conftest.err`
264
$rm conftest*
265
])# _LT_COMPILER_BOILERPLATE
266
267
268
# _LT_LINKER_BOILERPLATE
269
# ----------------------
270
# Check for linker boilerplate output or warnings with
271
# the simple link test code.
272
AC_DEFUN([_LT_LINKER_BOILERPLATE],
273
[ac_outfile=conftest.$ac_objext
274
printf "$lt_simple_link_test_code" >conftest.$ac_ext
275
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
276
_lt_linker_boilerplate=`cat conftest.err`
277
$rm conftest*
278
])# _LT_LINKER_BOILERPLATE
279
280
248
# _LT_AC_SYS_LIBPATH_AIX
281
# _LT_AC_SYS_LIBPATH_AIX
249
# ----------------------
282
# ----------------------
250
# Links a minimal program and checks the executable
283
# Links a minimal program and checks the executable
Lines 317-331 Link Here
317
350
318
# The HP-UX ksh and POSIX shell print the target directory to stdout
351
# The HP-UX ksh and POSIX shell print the target directory to stdout
319
# if CDPATH is set.
352
# if CDPATH is set.
320
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
353
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
321
354
322
if test -z "$ECHO"; then
355
if test -z "$ECHO"; then
323
if test "X${echo_test_string+set}" != Xset; then
356
if test "X${echo_test_string+set}" != Xset; then
324
# find a string as large as possible, as long as the shell can cope with it
357
# find a string as large as possible, as long as the shell can cope with it
325
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
358
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
326
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
359
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
327
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
360
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
328
       echo_test_string="`eval $cmd`" &&
361
       echo_test_string=`eval $cmd` &&
329
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
362
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
330
    then
363
    then
331
      break
364
      break
Lines 494-507 Link Here
494
  # Find out which ABI we are using.
527
  # Find out which ABI we are using.
495
  echo 'int i;' > conftest.$ac_ext
528
  echo 'int i;' > conftest.$ac_ext
496
  if AC_TRY_EVAL(ac_compile); then
529
  if AC_TRY_EVAL(ac_compile); then
497
    case "`/usr/bin/file conftest.o`" in
530
    case `/usr/bin/file conftest.o` in
498
    *32-bit*)
531
    *32-bit*)
499
      LINUX_64_MODE="32"
500
      case $host in
532
      case $host in
501
        x86_64-*linux*)
533
        x86_64-*linux*)
502
          LD="${LD-ld} -m elf_i386"
534
          LD="${LD-ld} -m elf_i386"
503
          ;;
535
          ;;
504
        ppc64-*linux*)
536
        ppc64-*linux*|powerpc64-*linux*)
505
          LD="${LD-ld} -m elf32ppclinux"
537
          LD="${LD-ld} -m elf32ppclinux"
506
          ;;
538
          ;;
507
        s390x-*linux*)
539
        s390x-*linux*)
Lines 513-519 Link Here
513
      esac
545
      esac
514
      ;;
546
      ;;
515
    *64-bit*)
547
    *64-bit*)
516
      LINUX_64_MODE="64"
517
      case $host in
548
      case $host in
518
        x86_64-*linux*)
549
        x86_64-*linux*)
519
          LD="${LD-ld} -m elf_x86_64"
550
          LD="${LD-ld} -m elf_x86_64"
Lines 547-552 Link Here
547
    CFLAGS="$SAVE_CFLAGS"
578
    CFLAGS="$SAVE_CFLAGS"
548
  fi
579
  fi
549
  ;;
580
  ;;
581
sparc*-*solaris*)
582
  # Find out which ABI we are using.
583
  echo 'int i;' > conftest.$ac_ext
584
  if AC_TRY_EVAL(ac_compile); then
585
    case `/usr/bin/file conftest.o` in
586
    *64-bit*)
587
      case $lt_cv_prog_gnu_ld in
588
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
589
      *)    LD="${LD-ld} -64" ;;
590
      esac
591
      ;;
592
    esac
593
  fi
594
  rm -rf conftest*
595
  ;;
596
550
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
597
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
551
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
598
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
552
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
599
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Lines 578-584 Link Here
578
   # with a dollar sign (not a hyphen), so the echo should work correctly.
625
   # with a dollar sign (not a hyphen), so the echo should work correctly.
579
   # The option is referenced via a variable to avoid confusing sed.
626
   # The option is referenced via a variable to avoid confusing sed.
580
   lt_compile=`echo "$ac_compile" | $SED \
627
   lt_compile=`echo "$ac_compile" | $SED \
581
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
628
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
582
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
629
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
583
   -e 's:$: $lt_compiler_flag:'`
630
   -e 's:$: $lt_compiler_flag:'`
584
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
631
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Lines 588-595 Link Here
588
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
635
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
589
   if (exit $ac_status) && test -s "$ac_outfile"; then
636
   if (exit $ac_status) && test -s "$ac_outfile"; then
590
     # The compiler can only warn and ignore the option if not recognized
637
     # The compiler can only warn and ignore the option if not recognized
591
     # So say no if there are warnings
638
     # So say no if there are warnings other than the usual output.
592
     if test ! -s conftest.err; then
639
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
640
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
641
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
593
       $2=yes
642
       $2=yes
594
     fi
643
     fi
595
   fi
644
   fi
Lines 615-625 Link Here
615
   LDFLAGS="$LDFLAGS $3"
664
   LDFLAGS="$LDFLAGS $3"
616
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
665
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
617
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
666
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
618
     # The compiler can only warn and ignore the option if not recognized
667
     # The linker can only warn and ignore the option if not recognized
619
     # So say no if there are warnings
668
     # So say no if there are warnings
620
     if test -s conftest.err; then
669
     if test -s conftest.err; then
621
       # Append any errors to the config.log.
670
       # Append any errors to the config.log.
622
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
671
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
672
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
673
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
674
       if diff conftest.exp conftest.er2 >/dev/null; then
675
         $2=yes
676
       fi
623
     else
677
     else
624
       $2=yes
678
       $2=yes
625
     fi
679
     fi
Lines 643-649 Link Here
643
AC_MSG_CHECKING([the maximum length of command line arguments])
697
AC_MSG_CHECKING([the maximum length of command line arguments])
644
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
698
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
645
  i=0
699
  i=0
646
  testring="ABCD"
700
  teststring="ABCD"
647
701
648
  case $build_os in
702
  case $build_os in
649
  msdosdjgpp*)
703
  msdosdjgpp*)
Lines 672-691 Link Here
672
    lt_cv_sys_max_cmd_len=8192;
726
    lt_cv_sys_max_cmd_len=8192;
673
    ;;
727
    ;;
674
728
675
 *)
729
  amigaos*)
730
    # On AmigaOS with pdksh, this test takes hours, literally.
731
    # So we just punt and use a minimum line length of 8192.
732
    lt_cv_sys_max_cmd_len=8192;
733
    ;;
734
735
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
736
    # This has been around since 386BSD, at least.  Likely further.
737
    if test -x /sbin/sysctl; then
738
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
739
    elif test -x /usr/sbin/sysctl; then
740
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
741
    else
742
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
743
    fi
744
    # And add a safety zone
745
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
746
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
747
    ;;
748
749
  interix*)
750
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
751
    lt_cv_sys_max_cmd_len=196608
752
    ;;
753
754
  osf*)
755
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
756
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
757
    # nice to cause kernel panics so lets avoid the loop below.
758
    # First set a reasonable default.
759
    lt_cv_sys_max_cmd_len=16384
760
    #
761
    if test -x /sbin/sysconfig; then
762
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
763
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
764
      esac
765
    fi
766
    ;;
767
  sco3.2v5*)
768
    lt_cv_sys_max_cmd_len=102400
769
    ;;
770
  sysv5* | sco5v6* | sysv4.2uw2*)
771
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
772
    if test -n "$kargmax"; then
773
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
774
    else
775
      lt_cv_sys_max_cmd_len=32768
776
    fi
777
    ;;
778
  *)
676
    # If test is not a shell built-in, we'll probably end up computing a
779
    # If test is not a shell built-in, we'll probably end up computing a
677
    # maximum length that is only half of the actual maximum length, but
780
    # maximum length that is only half of the actual maximum length, but
678
    # we can't tell.
781
    # we can't tell.
679
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
782
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
680
	       = "XX$testring") >/dev/null 2>&1 &&
783
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
681
	    new_result=`expr "X$testring" : ".*" 2>&1` &&
784
	       = "XX$teststring") >/dev/null 2>&1 &&
785
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
682
	    lt_cv_sys_max_cmd_len=$new_result &&
786
	    lt_cv_sys_max_cmd_len=$new_result &&
683
	    test $i != 17 # 1/2 MB should be enough
787
	    test $i != 17 # 1/2 MB should be enough
684
    do
788
    do
685
      i=`expr $i + 1`
789
      i=`expr $i + 1`
686
      testring=$testring$testring
790
      teststring=$teststring$teststring
687
    done
791
    done
688
    testring=
792
    teststring=
689
    # Add a significant safety factor because C++ compilers can tack on massive
793
    # Add a significant safety factor because C++ compilers can tack on massive
690
    # amounts of additional arguments before passing them to the linker.
794
    # amounts of additional arguments before passing them to the linker.
691
    # It appears as though 1/2 is a usable value.
795
    # It appears as though 1/2 is a usable value.
Lines 702-708 Link Here
702
806
703
807
704
# _LT_AC_CHECK_DLFCN
808
# _LT_AC_CHECK_DLFCN
705
# --------------------
809
# ------------------
706
AC_DEFUN([_LT_AC_CHECK_DLFCN],
810
AC_DEFUN([_LT_AC_CHECK_DLFCN],
707
[AC_CHECK_HEADERS(dlfcn.h)dnl
811
[AC_CHECK_HEADERS(dlfcn.h)dnl
708
])# _LT_AC_CHECK_DLFCN
812
])# _LT_AC_CHECK_DLFCN
Lines 710-716 Link Here
710
814
711
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
815
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
712
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
816
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
713
# ------------------------------------------------------------------
817
# ---------------------------------------------------------------------
714
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
818
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
715
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
819
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
716
if test "$cross_compiling" = yes; then :
820
if test "$cross_compiling" = yes; then :
Lines 776-792 Link Here
776
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
880
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
777
      /* dlclose (self); */
881
      /* dlclose (self); */
778
    }
882
    }
883
  else
884
    puts (dlerror ());
779
885
780
    exit (status);
886
    exit (status);
781
}]
887
}]
782
EOF
888
EOF
783
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
889
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
784
    (./conftest; exit; ) 2>/dev/null
890
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
785
    lt_status=$?
891
    lt_status=$?
786
    case x$lt_status in
892
    case x$lt_status in
787
      x$lt_dlno_uscore) $1 ;;
893
      x$lt_dlno_uscore) $1 ;;
788
      x$lt_dlneed_uscore) $2 ;;
894
      x$lt_dlneed_uscore) $2 ;;
789
      x$lt_unknown|x*) $3 ;;
895
      x$lt_dlunknown|x*) $3 ;;
790
    esac
896
    esac
791
  else :
897
  else :
792
    # compilation failed
898
    # compilation failed
Lines 798-804 Link Here
798
904
799
905
800
# AC_LIBTOOL_DLOPEN_SELF
906
# AC_LIBTOOL_DLOPEN_SELF
801
# -------------------
907
# ----------------------
802
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
908
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
803
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
909
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
804
if test "x$enable_dlopen" != xyes; then
910
if test "x$enable_dlopen" != xyes; then
Lines 835-841 Link Here
835
    lt_cv_dlopen_self=yes
941
    lt_cv_dlopen_self=yes
836
    ])
942
    ])
837
   ;;
943
   ;;
838
    
944
839
  *)
945
  *)
840
    AC_CHECK_FUNC([shl_load],
946
    AC_CHECK_FUNC([shl_load],
841
	  [lt_cv_dlopen="shl_load"],
947
	  [lt_cv_dlopen="shl_load"],
Lines 869-875 Link Here
869
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
975
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
870
976
871
    save_LDFLAGS="$LDFLAGS"
977
    save_LDFLAGS="$LDFLAGS"
872
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
978
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
873
979
874
    save_LIBS="$LIBS"
980
    save_LIBS="$LIBS"
875
    LIBS="$lt_cv_dlopen_libs $LIBS"
981
    LIBS="$lt_cv_dlopen_libs $LIBS"
Lines 882-888 Link Here
882
    ])
988
    ])
883
989
884
    if test "x$lt_cv_dlopen_self" = xyes; then
990
    if test "x$lt_cv_dlopen_self" = xyes; then
885
      LDFLAGS="$LDFLAGS $link_static_flag"
991
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
886
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
992
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
887
    	  lt_cv_dlopen_self_static, [dnl
993
    	  lt_cv_dlopen_self_static, [dnl
888
	  _LT_AC_TRY_DLOPEN_SELF(
994
	  _LT_AC_TRY_DLOPEN_SELF(
Lines 924-943 Link Here
924
   mkdir out
1030
   mkdir out
925
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1031
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
926
1032
927
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
928
   # that will create temporary files in the current directory regardless of
929
   # the output directory.  Thus, making CWD read-only will cause this test
930
   # to fail, enabling locking or at least warning the user not to do parallel
931
   # builds.
932
   chmod -w .
933
934
   lt_compiler_flag="-o out/conftest2.$ac_objext"
1033
   lt_compiler_flag="-o out/conftest2.$ac_objext"
935
   # Insert the option either (1) after the last *FLAGS variable, or
1034
   # Insert the option either (1) after the last *FLAGS variable, or
936
   # (2) before a word containing "conftest.", or (3) at the end.
1035
   # (2) before a word containing "conftest.", or (3) at the end.
937
   # Note that $ac_compile itself does not contain backslashes and begins
1036
   # Note that $ac_compile itself does not contain backslashes and begins
938
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1037
   # with a dollar sign (not a hyphen), so the echo should work correctly.
939
   lt_compile=`echo "$ac_compile" | $SED \
1038
   lt_compile=`echo "$ac_compile" | $SED \
940
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1039
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
941
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1040
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
942
   -e 's:$: $lt_compiler_flag:'`
1041
   -e 's:$: $lt_compiler_flag:'`
943
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1042
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Lines 949-961 Link Here
949
   then
1048
   then
950
     # The compiler can only warn and ignore the option if not recognized
1049
     # The compiler can only warn and ignore the option if not recognized
951
     # So say no if there are warnings
1050
     # So say no if there are warnings
952
     if test ! -s out/conftest.err; then
1051
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1052
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1053
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
953
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1054
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
954
     fi
1055
     fi
955
   fi
1056
   fi
956
   chmod u+w .
1057
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
957
   $rm conftest* out/*
1058
   $rm conftest*
958
   rmdir out
1059
   # SGI C++ compiler will create directory out/ii_files/ for
1060
   # template instantiation
1061
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1062
   $rm out/* && rmdir out
959
   cd ..
1063
   cd ..
960
   rmdir conftest
1064
   rmdir conftest
961
   $rm conftest*
1065
   $rm conftest*
Lines 1014-1021 Link Here
1014
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1118
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1015
_LT_AC_TAGVAR(hardcode_action, $1)=
1119
_LT_AC_TAGVAR(hardcode_action, $1)=
1016
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1120
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1017
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1121
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1018
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1122
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1019
1123
1020
  # We can hardcode non-existant directories.
1124
  # We can hardcode non-existant directories.
1021
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1125
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
Lines 1072-1078 Link Here
1072
   *)
1176
   *)
1073
  AC_MSG_RESULT([no])
1177
  AC_MSG_RESULT([no])
1074
    ;;
1178
    ;;
1075
  esac  
1179
  esac
1076
fi
1180
fi
1077
])# AC_LIBTOOL_SYS_LIB_STRIP
1181
])# AC_LIBTOOL_SYS_LIB_STRIP
1078
1182
Lines 1085-1091 Link Here
1085
library_names_spec=
1189
library_names_spec=
1086
libname_spec='lib$name'
1190
libname_spec='lib$name'
1087
soname_spec=
1191
soname_spec=
1088
shrext=".so"
1192
shrext_cmds=".so"
1089
postinstall_cmds=
1193
postinstall_cmds=
1090
postuninstall_cmds=
1194
postuninstall_cmds=
1091
finish_cmds=
1195
finish_cmds=
Lines 1095-1101 Link Here
1095
version_type=none
1199
version_type=none
1096
dynamic_linker="$host_os ld.so"
1200
dynamic_linker="$host_os ld.so"
1097
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1201
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1098
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1202
if test "$GCC" = yes; then
1203
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1204
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1205
    # if the path contains ";" then we assume it to be the separator
1206
    # otherwise default to the standard path separator (i.e. ":") - it is
1207
    # assumed that no part of a normal pathname contains ";" but that should
1208
    # okay in the real world where ";" in dirpaths is itself problematic.
1209
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1210
  else
1211
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1212
  fi
1213
else
1214
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1215
fi
1099
need_lib_prefix=unknown
1216
need_lib_prefix=unknown
1100
hardcode_into_libs=no
1217
hardcode_into_libs=no
1101
1218
Lines 1160-1166 Link Here
1160
amigaos*)
1277
amigaos*)
1161
  library_names_spec='$libname.ixlibrary $libname.a'
1278
  library_names_spec='$libname.ixlibrary $libname.a'
1162
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1279
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1163
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1280
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
1164
  ;;
1281
  ;;
1165
1282
1166
beos*)
1283
beos*)
Lines 1169-1175 Link Here
1169
  shlibpath_var=LIBRARY_PATH
1286
  shlibpath_var=LIBRARY_PATH
1170
  ;;
1287
  ;;
1171
1288
1172
bsdi4*)
1289
bsdi[[45]]*)
1173
  version_type=linux
1290
  version_type=linux
1174
  need_version=no
1291
  need_version=no
1175
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1292
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Lines 1185-1191 Link Here
1185
1302
1186
cygwin* | mingw* | pw32*)
1303
cygwin* | mingw* | pw32*)
1187
  version_type=windows
1304
  version_type=windows
1188
  shrext=".dll"
1305
  shrext_cmds=".dll"
1189
  need_version=no
1306
  need_version=no
1190
  need_lib_prefix=no
1307
  need_lib_prefix=no
1191
1308
Lines 1197-1203 Link Here
1197
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1314
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1198
      dldir=$destdir/`dirname \$dlpath`~
1315
      dldir=$destdir/`dirname \$dlpath`~
1199
      test -d \$dldir || mkdir -p \$dldir~
1316
      test -d \$dldir || mkdir -p \$dldir~
1200
      $install_prog $dir/$dlname \$dldir/$dlname'
1317
      $install_prog $dir/$dlname \$dldir/$dlname~
1318
      chmod a+x \$dldir/$dlname'
1201
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1319
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1202
      dlpath=$dir/\$dldll~
1320
      dlpath=$dir/\$dldll~
1203
       $rm \$dlpath'
1321
       $rm \$dlpath'
Lines 1227-1233 Link Here
1227
      ;;
1345
      ;;
1228
    pw32*)
1346
    pw32*)
1229
      # pw32 DLLs use 'pw' prefix rather than 'lib'
1347
      # pw32 DLLs use 'pw' prefix rather than 'lib'
1230
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1348
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1231
      ;;
1349
      ;;
1232
    esac
1350
    esac
1233
    ;;
1351
    ;;
Lines 1250-1256 Link Here
1250
  soname_spec='${libname}${release}${major}$shared_ext'
1368
  soname_spec='${libname}${release}${major}$shared_ext'
1251
  shlibpath_overrides_runpath=yes
1369
  shlibpath_overrides_runpath=yes
1252
  shlibpath_var=DYLD_LIBRARY_PATH
1370
  shlibpath_var=DYLD_LIBRARY_PATH
1253
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1371
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1254
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1372
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1255
  if test "$GCC" = yes; then
1373
  if test "$GCC" = yes; then
1256
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1374
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
Lines 1273-1292 Link Here
1273
  dynamic_linker=no
1391
  dynamic_linker=no
1274
  ;;
1392
  ;;
1275
1393
1276
kfreebsd*-gnu*)
1394
freebsd* | dragonfly*)
1277
  version_type=linux
1395
  # DragonFly does not have aout.  When/if they implement a new
1278
  need_lib_prefix=no
1396
  # versioning mechanism, adjust this.
1279
  need_version=no
1397
  if test -x /usr/bin/objformat; then
1280
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1398
    objformat=`/usr/bin/objformat`
1281
  soname_spec='${libname}${release}${shared_ext}$major'
1399
  else
1282
  shlibpath_var=LD_LIBRARY_PATH
1400
    case $host_os in
1283
  shlibpath_overrides_runpath=no
1401
    freebsd[[123]]*) objformat=aout ;;
1284
  hardcode_into_libs=yes
1402
    *) objformat=elf ;;
1285
  dynamic_linker='GNU ld.so'
1403
    esac
1286
  ;;
1404
  fi
1287
1288
freebsd*)
1289
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1290
  version_type=freebsd-$objformat
1405
  version_type=freebsd-$objformat
1291
  case $version_type in
1406
  case $version_type in
1292
    freebsd-elf*)
1407
    freebsd-elf*)
Lines 1304-1317 Link Here
1304
  freebsd2*)
1419
  freebsd2*)
1305
    shlibpath_overrides_runpath=yes
1420
    shlibpath_overrides_runpath=yes
1306
    ;;
1421
    ;;
1307
  freebsd3.[01]* | freebsdelf3.[01]*)
1422
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1308
    shlibpath_overrides_runpath=yes
1423
    shlibpath_overrides_runpath=yes
1309
    hardcode_into_libs=yes
1424
    hardcode_into_libs=yes
1310
    ;;
1425
    ;;
1311
  *) # from 3.2 on
1426
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1427
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1312
    shlibpath_overrides_runpath=no
1428
    shlibpath_overrides_runpath=no
1313
    hardcode_into_libs=yes
1429
    hardcode_into_libs=yes
1314
    ;;
1430
    ;;
1431
  freebsd*) # from 4.6 on
1432
    shlibpath_overrides_runpath=yes
1433
    hardcode_into_libs=yes
1434
    ;;
1315
  esac
1435
  esac
1316
  ;;
1436
  ;;
1317
1437
Lines 1331-1339 Link Here
1331
  version_type=sunos
1451
  version_type=sunos
1332
  need_lib_prefix=no
1452
  need_lib_prefix=no
1333
  need_version=no
1453
  need_version=no
1334
  case "$host_cpu" in
1454
  case $host_cpu in
1335
  ia64*)
1455
  ia64*)
1336
    shrext='.so'
1456
    shrext_cmds='.so'
1337
    hardcode_into_libs=yes
1457
    hardcode_into_libs=yes
1338
    dynamic_linker="$host_os dld.so"
1458
    dynamic_linker="$host_os dld.so"
1339
    shlibpath_var=LD_LIBRARY_PATH
1459
    shlibpath_var=LD_LIBRARY_PATH
Lines 1348-1354 Link Here
1348
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1468
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1349
    ;;
1469
    ;;
1350
   hppa*64*)
1470
   hppa*64*)
1351
     shrext='.sl'
1471
     shrext_cmds='.sl'
1352
     hardcode_into_libs=yes
1472
     hardcode_into_libs=yes
1353
     dynamic_linker="$host_os dld.sl"
1473
     dynamic_linker="$host_os dld.sl"
1354
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1474
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Lines 1359-1365 Link Here
1359
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1479
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1360
     ;;
1480
     ;;
1361
   *)
1481
   *)
1362
    shrext='.sl'
1482
    shrext_cmds='.sl'
1363
    dynamic_linker="$host_os dld.sl"
1483
    dynamic_linker="$host_os dld.sl"
1364
    shlibpath_var=SHLIB_PATH
1484
    shlibpath_var=SHLIB_PATH
1365
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1485
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Lines 1371-1376 Link Here
1371
  postinstall_cmds='chmod 555 $lib'
1491
  postinstall_cmds='chmod 555 $lib'
1372
  ;;
1492
  ;;
1373
1493
1494
interix3*)
1495
  version_type=linux
1496
  need_lib_prefix=no
1497
  need_version=no
1498
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1499
  soname_spec='${libname}${release}${shared_ext}$major'
1500
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1501
  shlibpath_var=LD_LIBRARY_PATH
1502
  shlibpath_overrides_runpath=no
1503
  hardcode_into_libs=yes
1504
  ;;
1505
1374
irix5* | irix6* | nonstopux*)
1506
irix5* | irix6* | nonstopux*)
1375
  case $host_os in
1507
  case $host_os in
1376
    nonstopux*) version_type=nonstopux ;;
1508
    nonstopux*) version_type=nonstopux ;;
Lines 1414-1442 Link Here
1414
  ;;
1546
  ;;
1415
1547
1416
# This must be Linux ELF.
1548
# This must be Linux ELF.
1417
linux*)
1549
linux* | k*bsd*-gnu)
1418
  version_type=linux
1550
  version_type=linux
1419
  need_lib_prefix=no
1551
  need_lib_prefix=no
1420
  need_version=no
1552
  need_version=no
1421
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1553
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1422
  soname_spec='${libname}${release}${shared_ext}$major'
1554
  soname_spec='${libname}${release}${shared_ext}$major'
1423
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1555
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1424
  libsuff=
1425
  if test "x$LINUX_64_MODE" = x64; then
1426
    # Some platforms are per default 64-bit, so there's no /lib64
1427
    if test -d /lib64 -a ! -h /lib64; then
1428
      libsuff=64
1429
    fi
1430
  fi
1431
  shlibpath_var=LD_LIBRARY_PATH
1556
  shlibpath_var=LD_LIBRARY_PATH
1432
  shlibpath_overrides_runpath=no
1557
  shlibpath_overrides_runpath=no
1433
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
1434
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1435
  # This implies no fast_install, which is unacceptable.
1558
  # This implies no fast_install, which is unacceptable.
1436
  # Some rework will be needed to allow for fast_install
1559
  # Some rework will be needed to allow for fast_install
1437
  # before this can be enabled.
1560
  # before this can be enabled.
1438
  hardcode_into_libs=yes
1561
  hardcode_into_libs=yes
1439
1562
1563
  # Append ld.so.conf contents to the search path
1564
  if test -f /etc/ld.so.conf; then
1565
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1566
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1567
  fi
1568
1440
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1569
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1441
  # powerpc, because MkLinux only supported shared libraries with the
1570
  # powerpc, because MkLinux only supported shared libraries with the
1442
  # GNU dynamic linker.  Since this was broken with cross compilers,
1571
  # GNU dynamic linker.  Since this was broken with cross compilers,
Lines 1446-1451 Link Here
1446
  dynamic_linker='GNU/Linux ld.so'
1575
  dynamic_linker='GNU/Linux ld.so'
1447
  ;;
1576
  ;;
1448
1577
1578
netbsdelf*-gnu)
1579
  version_type=linux
1580
  need_lib_prefix=no
1581
  need_version=no
1582
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1583
  soname_spec='${libname}${release}${shared_ext}$major'
1584
  shlibpath_var=LD_LIBRARY_PATH
1585
  shlibpath_overrides_runpath=no
1586
  hardcode_into_libs=yes
1587
  dynamic_linker='NetBSD ld.elf_so'
1588
  ;;
1589
1449
netbsd*)
1590
netbsd*)
1450
  version_type=sunos
1591
  version_type=sunos
1451
  need_lib_prefix=no
1592
  need_lib_prefix=no
Lines 1455-1461 Link Here
1455
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1596
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1456
    dynamic_linker='NetBSD (a.out) ld.so'
1597
    dynamic_linker='NetBSD (a.out) ld.so'
1457
  else
1598
  else
1458
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
1599
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1459
    soname_spec='${libname}${release}${shared_ext}$major'
1600
    soname_spec='${libname}${release}${shared_ext}$major'
1460
    dynamic_linker='NetBSD ld.elf_so'
1601
    dynamic_linker='NetBSD ld.elf_so'
1461
  fi
1602
  fi
Lines 1483-1490 Link Here
1483
1624
1484
openbsd*)
1625
openbsd*)
1485
  version_type=sunos
1626
  version_type=sunos
1627
  sys_lib_dlsearch_path_spec="/usr/lib"
1486
  need_lib_prefix=no
1628
  need_lib_prefix=no
1487
  need_version=no
1629
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1630
  case $host_os in
1631
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1632
    *)                         need_version=no  ;;
1633
  esac
1488
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1634
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1489
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1635
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1490
  shlibpath_var=LD_LIBRARY_PATH
1636
  shlibpath_var=LD_LIBRARY_PATH
Lines 1504-1510 Link Here
1504
1650
1505
os2*)
1651
os2*)
1506
  libname_spec='$name'
1652
  libname_spec='$name'
1507
  shrext=".dll"
1653
  shrext_cmds=".dll"
1508
  need_lib_prefix=no
1654
  need_lib_prefix=no
1509
  library_names_spec='$libname${shared_ext} $libname.a'
1655
  library_names_spec='$libname${shared_ext} $libname.a'
1510
  dynamic_linker='OS/2 ld.exe'
1656
  dynamic_linker='OS/2 ld.exe'
Lines 1522-1534 Link Here
1522
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1668
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1523
  ;;
1669
  ;;
1524
1670
1525
sco3.2v5*)
1526
  version_type=osf
1527
  soname_spec='${libname}${release}${shared_ext}$major'
1528
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1529
  shlibpath_var=LD_LIBRARY_PATH
1530
  ;;
1531
1532
solaris*)
1671
solaris*)
1533
  version_type=linux
1672
  version_type=linux
1534
  need_lib_prefix=no
1673
  need_lib_prefix=no
Lines 1554-1560 Link Here
1554
  need_version=yes
1693
  need_version=yes
1555
  ;;
1694
  ;;
1556
1695
1557
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1696
sysv4 | sysv4.3*)
1558
  version_type=linux
1697
  version_type=linux
1559
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1698
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1560
  soname_spec='${libname}${release}${shared_ext}$major'
1699
  soname_spec='${libname}${release}${shared_ext}$major'
Lines 1587-1592 Link Here
1587
  fi
1726
  fi
1588
  ;;
1727
  ;;
1589
1728
1729
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1730
  version_type=freebsd-elf
1731
  need_lib_prefix=no
1732
  need_version=no
1733
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1734
  soname_spec='${libname}${release}${shared_ext}$major'
1735
  shlibpath_var=LD_LIBRARY_PATH
1736
  hardcode_into_libs=yes
1737
  if test "$with_gnu_ld" = yes; then
1738
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1739
    shlibpath_overrides_runpath=no
1740
  else
1741
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1742
    shlibpath_overrides_runpath=yes
1743
    case $host_os in
1744
      sco3.2v5*)
1745
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1746
	;;
1747
    esac
1748
  fi
1749
  sys_lib_dlsearch_path_spec='/usr/lib'
1750
  ;;
1751
1590
uts4*)
1752
uts4*)
1591
  version_type=linux
1753
  version_type=linux
1592
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1754
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Lines 1600-1605 Link Here
1600
esac
1762
esac
1601
AC_MSG_RESULT([$dynamic_linker])
1763
AC_MSG_RESULT([$dynamic_linker])
1602
test "$dynamic_linker" = no && can_build_shared=no
1764
test "$dynamic_linker" = no && can_build_shared=no
1765
1766
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1767
if test "$GCC" = yes; then
1768
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1769
fi
1603
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1770
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1604
1771
1605
1772
Lines 1624-1629 Link Here
1624
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1791
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1625
    fi
1792
    fi
1626
  fi
1793
  fi
1794
  if test -z "$LTCFLAGS"; then
1795
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1796
  fi
1627
1797
1628
  # Extract list of available tagged configurations in $ofile.
1798
  # Extract list of available tagged configurations in $ofile.
1629
  # Note that this assumes the entire list is on one line.
1799
  # Note that this assumes the entire list is on one line.
Lines 1650-1656 Link Here
1650
1820
1651
      case $tagname in
1821
      case $tagname in
1652
      CXX)
1822
      CXX)
1653
	if test -n "$CXX" && test "X$CXX" != "Xno"; then
1823
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1824
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1825
	    (test "X$CXX" != "Xg++"))) ; then
1654
	  AC_LIBTOOL_LANG_CXX_CONFIG
1826
	  AC_LIBTOOL_LANG_CXX_CONFIG
1655
	else
1827
	else
1656
	  tagname=""
1828
	  tagname=""
Lines 1712-1718 Link Here
1712
1884
1713
# AC_LIBTOOL_WIN32_DLL
1885
# AC_LIBTOOL_WIN32_DLL
1714
# --------------------
1886
# --------------------
1715
# declare package support for building win32 dll's
1887
# declare package support for building win32 DLLs
1716
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1888
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1717
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1889
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1718
])# AC_LIBTOOL_WIN32_DLL
1890
])# AC_LIBTOOL_WIN32_DLL
Lines 1750-1756 Link Here
1750
1922
1751
# AC_DISABLE_SHARED
1923
# AC_DISABLE_SHARED
1752
# -----------------
1924
# -----------------
1753
#- set the default shared flag to --disable-shared
1925
# set the default shared flag to --disable-shared
1754
AC_DEFUN([AC_DISABLE_SHARED],
1926
AC_DEFUN([AC_DISABLE_SHARED],
1755
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1927
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1756
AC_ENABLE_SHARED(no)
1928
AC_ENABLE_SHARED(no)
Lines 1886-1892 Link Here
1886
      if test -n "$file_magic_test_file"; then
2058
      if test -n "$file_magic_test_file"; then
1887
	case $deplibs_check_method in
2059
	case $deplibs_check_method in
1888
	"file_magic "*)
2060
	"file_magic "*)
1889
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2061
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1890
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2062
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1891
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2063
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1892
	    $EGREP "$file_magic_regex" > /dev/null; then
2064
	    $EGREP "$file_magic_regex" > /dev/null; then
Lines 1996-2002 Link Here
1996
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2168
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1997
      lt_cv_path_LD="$ac_dir/$ac_prog"
2169
      lt_cv_path_LD="$ac_dir/$ac_prog"
1998
      # Check to see if the program is GNU ld.  I'd rather use --version,
2170
      # Check to see if the program is GNU ld.  I'd rather use --version,
1999
      # but apparently some GNU ld's only accept -v.
2171
      # but apparently some variants of GNU ld only accept -v.
2000
      # Break only if it was the GNU/non-GNU ld that we prefer.
2172
      # Break only if it was the GNU/non-GNU ld that we prefer.
2001
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2173
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2002
      *GNU* | *'with BFD'*)
2174
      *GNU* | *'with BFD'*)
Lines 2028-2034 Link Here
2028
AC_DEFUN([AC_PROG_LD_GNU],
2200
AC_DEFUN([AC_PROG_LD_GNU],
2029
[AC_REQUIRE([AC_PROG_EGREP])dnl
2201
[AC_REQUIRE([AC_PROG_EGREP])dnl
2030
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2202
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2031
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2203
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2032
case `$LD -v 2>&1 </dev/null` in
2204
case `$LD -v 2>&1 </dev/null` in
2033
*GNU* | *'with BFD'*)
2205
*GNU* | *'with BFD'*)
2034
  lt_cv_prog_gnu_ld=yes
2206
  lt_cv_prog_gnu_ld=yes
Lines 2055-2060 Link Here
2055
*) reload_flag=" $reload_flag" ;;
2227
*) reload_flag=" $reload_flag" ;;
2056
esac
2228
esac
2057
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2229
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2230
case $host_os in
2231
  darwin*)
2232
    if test "$GCC" = yes; then
2233
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2234
    else
2235
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2236
    fi
2237
    ;;
2238
esac
2058
])# AC_PROG_LD_RELOAD_FLAG
2239
])# AC_PROG_LD_RELOAD_FLAG
2059
2240
2060
2241
Lines 2088-2131 Link Here
2088
  lt_cv_deplibs_check_method=pass_all
2269
  lt_cv_deplibs_check_method=pass_all
2089
  ;;
2270
  ;;
2090
2271
2091
bsdi4*)
2272
bsdi[[45]]*)
2092
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2273
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2093
  lt_cv_file_magic_cmd='/usr/bin/file -L'
2274
  lt_cv_file_magic_cmd='/usr/bin/file -L'
2094
  lt_cv_file_magic_test_file=/shlib/libc.so
2275
  lt_cv_file_magic_test_file=/shlib/libc.so
2095
  ;;
2276
  ;;
2096
2277
2097
cygwin*)
2278
cygwin*)
2098
  lt_cv_deplibs_check_method=pass_all
2279
  # func_win32_libid is a shell function defined in ltmain.sh
2280
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2281
  lt_cv_file_magic_cmd='func_win32_libid'
2099
  ;;
2282
  ;;
2100
  
2283
2101
mingw* | pw32*)
2284
mingw* | pw32*)
2102
  # win32_libid is a shell function defined in ltmain.sh
2285
  # Base MSYS/MinGW do not provide the 'file' command needed by
2103
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2286
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2104
  lt_cv_file_magic_cmd='win32_libid'
2287
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2288
  lt_cv_file_magic_cmd='$OBJDUMP -f'
2105
  ;;
2289
  ;;
2106
2290
2107
darwin* | rhapsody*)
2291
darwin* | rhapsody*)
2108
  # this will be overwritten by pass_all, but leave it in just in case
2109
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2110
  lt_cv_file_magic_cmd='/usr/bin/file -L'
2111
  case "$host_os" in
2112
  rhapsody* | darwin1.[[012]])
2113
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2114
    ;;
2115
  *) # Darwin 1.3 on
2116
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2117
    ;;
2118
  esac
2119
  lt_cv_deplibs_check_method=pass_all
2292
  lt_cv_deplibs_check_method=pass_all
2120
  ;;
2293
  ;;
2121
2294
2122
freebsd* | kfreebsd*-gnu)
2295
freebsd* | dragonfly*)
2123
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2296
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2124
    case $host_cpu in
2297
    case $host_cpu in
2125
    i*86 )
2298
    i*86 )
2126
      # Not sure whether the presence of OpenBSD here was a mistake.
2299
      # Not sure whether the presence of OpenBSD here was a mistake.
2127
      # Let's accept both of them until this is cleared up.
2300
      # Let's accept both of them until this is cleared up.
2128
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2301
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2129
      lt_cv_file_magic_cmd=/usr/bin/file
2302
      lt_cv_file_magic_cmd=/usr/bin/file
2130
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2303
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2131
      ;;
2304
      ;;
Lines 2141-2147 Link Here
2141
2314
2142
hpux10.20* | hpux11*)
2315
hpux10.20* | hpux11*)
2143
  lt_cv_file_magic_cmd=/usr/bin/file
2316
  lt_cv_file_magic_cmd=/usr/bin/file
2144
  case "$host_cpu" in
2317
  case $host_cpu in
2145
  ia64*)
2318
  ia64*)
2146
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2319
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2147
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2320
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Lines 2157-2199 Link Here
2157
  esac
2330
  esac
2158
  ;;
2331
  ;;
2159
2332
2333
interix3*)
2334
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2335
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2336
  ;;
2337
2160
irix5* | irix6* | nonstopux*)
2338
irix5* | irix6* | nonstopux*)
2161
  case $host_os in
2339
  case $LD in
2162
  irix5* | nonstopux*)
2340
  *-32|*"-32 ") libmagic=32-bit;;
2163
    # this will be overridden with pass_all, but let us keep it just in case
2341
  *-n32|*"-n32 ") libmagic=N32;;
2164
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2342
  *-64|*"-64 ") libmagic=64-bit;;
2165
    ;;
2343
  *) libmagic=never-match;;
2166
  *)
2167
    case $LD in
2168
    *-32|*"-32 ") libmagic=32-bit;;
2169
    *-n32|*"-n32 ") libmagic=N32;;
2170
    *-64|*"-64 ") libmagic=64-bit;;
2171
    *) libmagic=never-match;;
2172
    esac
2173
    # this will be overridden with pass_all, but let us keep it just in case
2174
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2175
    ;;
2176
  esac
2344
  esac
2177
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2178
  lt_cv_deplibs_check_method=pass_all
2345
  lt_cv_deplibs_check_method=pass_all
2179
  ;;
2346
  ;;
2180
2347
2181
# This must be Linux ELF.
2348
# This must be Linux ELF.
2182
linux*)
2349
linux* | k*bsd*-gnu)
2183
  case $host_cpu in
2350
  lt_cv_deplibs_check_method=pass_all
2184
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
2185
    lt_cv_deplibs_check_method=pass_all ;;
2186
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
2187
  arm* )
2188
    lt_cv_deplibs_check_method=pass_all ;;
2189
  *)
2190
    # glibc up to 2.1.1 does not perform some relocations on ARM
2191
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2192
  esac
2193
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2194
  ;;
2351
  ;;
2195
2352
2196
netbsd*)
2353
netbsd* | netbsdelf*-gnu)
2197
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2354
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2198
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2355
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2199
  else
2356
  else
Lines 2212-2243 Link Here
2212
  ;;
2369
  ;;
2213
2370
2214
openbsd*)
2371
openbsd*)
2215
  lt_cv_file_magic_cmd=/usr/bin/file
2216
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2217
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2372
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2218
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2373
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2219
  else
2374
  else
2220
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2375
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2221
  fi
2376
  fi
2222
  ;;
2377
  ;;
2223
2378
2224
osf3* | osf4* | osf5*)
2379
osf3* | osf4* | osf5*)
2225
  # this will be overridden with pass_all, but let us keep it just in case
2226
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2227
  lt_cv_file_magic_test_file=/shlib/libc.so
2228
  lt_cv_deplibs_check_method=pass_all
2229
  ;;
2230
2231
sco3.2v5*)
2232
  lt_cv_deplibs_check_method=pass_all
2380
  lt_cv_deplibs_check_method=pass_all
2233
  ;;
2381
  ;;
2234
2382
2235
solaris*)
2383
solaris*)
2236
  lt_cv_deplibs_check_method=pass_all
2384
  lt_cv_deplibs_check_method=pass_all
2237
  lt_cv_file_magic_test_file=/lib/libc.so
2238
  ;;
2385
  ;;
2239
2386
2240
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2387
sysv4 | sysv4.3*)
2241
  case $host_vendor in
2388
  case $host_vendor in
2242
  motorola)
2389
  motorola)
2243
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
2390
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
Lines 2258-2267 Link Here
2258
  siemens)
2405
  siemens)
2259
    lt_cv_deplibs_check_method=pass_all
2406
    lt_cv_deplibs_check_method=pass_all
2260
    ;;
2407
    ;;
2408
  pc)
2409
    lt_cv_deplibs_check_method=pass_all
2410
    ;;
2261
  esac
2411
  esac
2262
  ;;
2412
  ;;
2263
2413
2264
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2414
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2265
  lt_cv_deplibs_check_method=pass_all
2415
  lt_cv_deplibs_check_method=pass_all
2266
  ;;
2416
  ;;
2267
esac
2417
esac
Lines 2281-2316 Link Here
2281
  # Let the user override the test.
2431
  # Let the user override the test.
2282
  lt_cv_path_NM="$NM"
2432
  lt_cv_path_NM="$NM"
2283
else
2433
else
2284
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2434
  lt_nm_to_check="${ac_tool_prefix}nm"
2285
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2435
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
2286
    IFS="$lt_save_ifs"
2436
    lt_nm_to_check="$lt_nm_to_check nm"
2287
    test -z "$ac_dir" && ac_dir=.
2437
  fi
2288
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2438
  for lt_tmp_nm in $lt_nm_to_check; do
2289
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2439
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2290
      # Check to see if the nm accepts a BSD-compat flag.
2440
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2291
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2441
      IFS="$lt_save_ifs"
2292
      #   nm: unknown option "B" ignored
2442
      test -z "$ac_dir" && ac_dir=.
2293
      # Tru64's nm complains that /dev/null is an invalid object file
2443
      tmp_nm="$ac_dir/$lt_tmp_nm"
2294
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2444
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2295
      */dev/null* | *'Invalid file or object type'*)
2445
	# Check to see if the nm accepts a BSD-compat flag.
2296
	lt_cv_path_NM="$tmp_nm -B"
2446
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2297
	break
2447
	#   nm: unknown option "B" ignored
2298
        ;;
2448
	# Tru64's nm complains that /dev/null is an invalid object file
2299
      *)
2449
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2300
	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2450
	*/dev/null* | *'Invalid file or object type'*)
2301
	*/dev/null*)
2451
	  lt_cv_path_NM="$tmp_nm -B"
2302
	  lt_cv_path_NM="$tmp_nm -p"
2303
	  break
2452
	  break
2304
	  ;;
2453
	  ;;
2305
	*)
2454
	*)
2306
	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2455
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2307
	  continue # so that we can try to find one that supports BSD flags
2456
	  */dev/null*)
2457
	    lt_cv_path_NM="$tmp_nm -p"
2458
	    break
2459
	    ;;
2460
	  *)
2461
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2462
	    continue # so that we can try to find one that supports BSD flags
2463
	    ;;
2464
	  esac
2308
	  ;;
2465
	  ;;
2309
	esac
2466
	esac
2310
      esac
2467
      fi
2311
    fi
2468
    done
2469
    IFS="$lt_save_ifs"
2312
  done
2470
  done
2313
  IFS="$lt_save_ifs"
2314
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2471
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2315
fi])
2472
fi])
2316
NM="$lt_cv_path_NM"
2473
NM="$lt_cv_path_NM"
Lines 2342-2354 Link Here
2342
# -----------------------------------
2499
# -----------------------------------
2343
# sets LIBLTDL to the link flags for the libltdl convenience library and
2500
# sets LIBLTDL to the link flags for the libltdl convenience library and
2344
# LTDLINCL to the include flags for the libltdl header and adds
2501
# LTDLINCL to the include flags for the libltdl header and adds
2345
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2502
# --enable-ltdl-convenience to the configure arguments.  Note that
2346
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2503
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2347
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2504
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2348
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2505
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2349
# '${top_srcdir}/' (note the single quotes!).  If your package is not
2506
# (note the single quotes!).  If your package is not flat and you're not
2350
# flat and you're not using automake, define top_builddir and
2507
# using automake, define top_builddir and top_srcdir appropriately in
2351
# top_srcdir appropriately in the Makefiles.
2508
# the Makefiles.
2352
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2509
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2353
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2510
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2354
  case $enable_ltdl_convenience in
2511
  case $enable_ltdl_convenience in
Lines 2367-2379 Link Here
2367
# -----------------------------------
2524
# -----------------------------------
2368
# sets LIBLTDL to the link flags for the libltdl installable library and
2525
# sets LIBLTDL to the link flags for the libltdl installable library and
2369
# LTDLINCL to the include flags for the libltdl header and adds
2526
# LTDLINCL to the include flags for the libltdl header and adds
2370
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2527
# --enable-ltdl-install to the configure arguments.  Note that
2371
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2528
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2372
# DIRECTORY is not provided and an installed libltdl is not found, it is
2529
# and an installed libltdl is not found, it is assumed to be `libltdl'.
2373
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2530
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2374
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2531
# '${top_srcdir}/' (note the single quotes!).  If your package is not
2375
# quotes!).  If your package is not flat and you're not using automake,
2532
# flat and you're not using automake, define top_builddir and top_srcdir
2376
# define top_builddir and top_srcdir appropriately in the Makefiles.
2533
# appropriately in the Makefiles.
2377
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2534
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2378
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2535
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2379
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2536
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Lines 2411-2420 Link Here
2411
# ---------------
2568
# ---------------
2412
AC_DEFUN([_LT_AC_LANG_CXX],
2569
AC_DEFUN([_LT_AC_LANG_CXX],
2413
[AC_REQUIRE([AC_PROG_CXX])
2570
[AC_REQUIRE([AC_PROG_CXX])
2414
AC_REQUIRE([AC_PROG_CXXCPP])
2571
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2415
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2572
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2416
])# _LT_AC_LANG_CXX
2573
])# _LT_AC_LANG_CXX
2417
2574
2575
# _LT_AC_PROG_CXXCPP
2576
# ------------------
2577
AC_DEFUN([_LT_AC_PROG_CXXCPP],
2578
[
2579
AC_REQUIRE([AC_PROG_CXX])
2580
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2581
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2582
    (test "X$CXX" != "Xg++"))) ; then
2583
  AC_PROG_CXXCPP
2584
fi
2585
])# _LT_AC_PROG_CXXCPP
2418
2586
2419
# AC_LIBTOOL_F77
2587
# AC_LIBTOOL_F77
2420
# --------------
2588
# --------------
Lines 2454-2460 Link Here
2454
2622
2455
2623
2456
# AC_LIBTOOL_RC
2624
# AC_LIBTOOL_RC
2457
# --------------
2625
# -------------
2458
# enable support for Windows resource files
2626
# enable support for Windows resource files
2459
AC_DEFUN([AC_LIBTOOL_RC],
2627
AC_DEFUN([AC_LIBTOOL_RC],
2460
[AC_REQUIRE([LT_AC_PROG_RC])
2628
[AC_REQUIRE([LT_AC_PROG_RC])
Lines 2487-2522 Link Here
2487
2655
2488
_LT_AC_SYS_COMPILER
2656
_LT_AC_SYS_COMPILER
2489
2657
2490
#
2658
# save warnings/boilerplate of simple test code
2491
# Check for any special shared library compilation flags.
2659
_LT_COMPILER_BOILERPLATE
2492
#
2660
_LT_LINKER_BOILERPLATE
2493
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2494
if test "$GCC" = no; then
2495
  case $host_os in
2496
  sco3.2v5*)
2497
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2498
    ;;
2499
  esac
2500
fi
2501
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2502
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2503
  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
2504
  else
2505
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2506
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2507
  fi
2508
fi
2509
2510
2511
#
2512
# Check to make sure the static flag actually works.
2513
#
2514
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2515
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2516
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2517
  [],
2518
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2519
2520
2661
2521
## CAVEAT EMPTOR:
2662
## CAVEAT EMPTOR:
2522
## There is no encapsulation within the following macros, do not change
2663
## There is no encapsulation within the following macros, do not change
Lines 2530-2538 Link Here
2530
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2671
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2531
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2672
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2532
AC_LIBTOOL_SYS_LIB_STRIP
2673
AC_LIBTOOL_SYS_LIB_STRIP
2533
AC_LIBTOOL_DLOPEN_SELF($1)
2674
AC_LIBTOOL_DLOPEN_SELF
2534
2675
2535
# Report which librarie types wil actually be built
2676
# Report which library types will actually be built
2536
AC_MSG_CHECKING([if libtool supports shared libraries])
2677
AC_MSG_CHECKING([if libtool supports shared libraries])
2537
AC_MSG_RESULT([$can_build_shared])
2678
AC_MSG_RESULT([$can_build_shared])
2538
2679
Lines 2541-2547 Link Here
2541
2682
2542
# On AIX, shared libraries and static libraries use the same namespace, and
2683
# On AIX, shared libraries and static libraries use the same namespace, and
2543
# are all built from PIC.
2684
# are all built from PIC.
2544
case "$host_os" in
2685
case $host_os in
2545
aix3*)
2686
aix3*)
2546
  test "$enable_shared" = yes && enable_static=no
2687
  test "$enable_shared" = yes && enable_static=no
2547
  if test -n "$RANLIB"; then
2688
  if test -n "$RANLIB"; then
Lines 2550-2597 Link Here
2550
  fi
2691
  fi
2551
  ;;
2692
  ;;
2552
2693
2553
aix4*)
2694
aix4* | aix5*)
2554
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2695
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2555
    test "$enable_shared" = yes && enable_static=no
2696
    test "$enable_shared" = yes && enable_static=no
2556
  fi
2697
  fi
2557
  ;;
2698
    ;;
2558
  darwin* | rhapsody*)
2559
  if test "$GCC" = yes; then
2560
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2561
    case "$host_os" in
2562
    rhapsody* | darwin1.[[012]])
2563
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
2564
      ;;
2565
    *) # Darwin 1.3 on
2566
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2567
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
2568
      else
2569
	case ${MACOSX_DEPLOYMENT_TARGET} in
2570
	  10.[012])
2571
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
2572
	    ;;
2573
	  10.*)
2574
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
2575
	    ;;
2576
	esac
2577
      fi
2578
      ;;
2579
    esac
2580
    output_verbose_link_cmd='echo'
2581
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
2582
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
2583
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2584
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2585
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2586
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
2587
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2588
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2589
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2590
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2591
  else
2592
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2593
  fi  
2594
    ;;  
2595
esac
2699
esac
2596
AC_MSG_RESULT([$enable_shared])
2700
AC_MSG_RESULT([$enable_shared])
2597
2701
Lines 2616-2622 Link Here
2616
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2720
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2617
[AC_LANG_PUSH(C++)
2721
[AC_LANG_PUSH(C++)
2618
AC_REQUIRE([AC_PROG_CXX])
2722
AC_REQUIRE([AC_PROG_CXX])
2619
AC_REQUIRE([AC_PROG_CXXCPP])
2723
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2620
2724
2621
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2725
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2622
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2726
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
Lines 2628-2633 Link Here
2628
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2732
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2629
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2733
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2630
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2734
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2735
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2631
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2736
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2632
_LT_AC_TAGVAR(module_cmds, $1)=
2737
_LT_AC_TAGVAR(module_cmds, $1)=
2633
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2738
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
Lines 2645-2651 Link Here
2645
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2750
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2646
2751
2647
# Source file extension for C++ test sources.
2752
# Source file extension for C++ test sources.
2648
ac_ext=cc
2753
ac_ext=cpp
2649
2754
2650
# Object file extension for compiled C++ test sources.
2755
# Object file extension for compiled C++ test sources.
2651
objext=o
2756
objext=o
Lines 2655-2665 Link Here
2655
lt_simple_compile_test_code="int some_variable = 0;\n"
2760
lt_simple_compile_test_code="int some_variable = 0;\n"
2656
2761
2657
# Code to be used in simple link tests
2762
# Code to be used in simple link tests
2658
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2763
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2659
2764
2660
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2765
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2661
_LT_AC_SYS_COMPILER
2766
_LT_AC_SYS_COMPILER
2662
2767
2768
# save warnings/boilerplate of simple test code
2769
_LT_COMPILER_BOILERPLATE
2770
_LT_LINKER_BOILERPLATE
2771
2663
# Allow CC to be a program name with arguments.
2772
# Allow CC to be a program name with arguments.
2664
lt_save_CC=$CC
2773
lt_save_CC=$CC
2665
lt_save_LD=$LD
2774
lt_save_LD=$LD
Lines 2670-2687 Link Here
2670
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2779
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2671
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2780
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2672
else
2781
else
2673
  unset lt_cv_prog_gnu_ld
2782
  $as_unset lt_cv_prog_gnu_ld
2674
fi
2783
fi
2675
if test -n "${lt_cv_path_LDCXX+set}"; then
2784
if test -n "${lt_cv_path_LDCXX+set}"; then
2676
  lt_cv_path_LD=$lt_cv_path_LDCXX
2785
  lt_cv_path_LD=$lt_cv_path_LDCXX
2677
else
2786
else
2678
  unset lt_cv_path_LD
2787
  $as_unset lt_cv_path_LD
2679
fi
2788
fi
2680
test -z "${LDCXX+set}" || LD=$LDCXX
2789
test -z "${LDCXX+set}" || LD=$LDCXX
2681
CC=${CXX-"c++"}
2790
CC=${CXX-"c++"}
2682
compiler=$CC
2791
compiler=$CC
2683
_LT_AC_TAGVAR(compiler, $1)=$CC
2792
_LT_AC_TAGVAR(compiler, $1)=$CC
2684
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2793
_LT_CC_BASENAME([$compiler])
2685
2794
2686
# We don't want -fno-exception wen compiling C++ code, so set the
2795
# We don't want -fno-exception wen compiling C++ code, so set the
2687
# no_builtin_flag separately
2796
# no_builtin_flag separately
Lines 2699-2706 Link Here
2699
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2808
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2700
  # archiving commands below assume that GNU ld is being used.
2809
  # archiving commands below assume that GNU ld is being used.
2701
  if test "$with_gnu_ld" = yes; then
2810
  if test "$with_gnu_ld" = yes; then
2702
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
2811
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2703
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2812
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2704
2813
2705
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2814
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2706
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2815
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Lines 2726-2732 Link Here
2726
    # linker, instead of GNU ld.  If possible, this setting should
2835
    # linker, instead of GNU ld.  If possible, this setting should
2727
    # overridden to take advantage of the native linker features on
2836
    # overridden to take advantage of the native linker features on
2728
    # the platform it is being used on.
2837
    # the platform it is being used on.
2729
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
2838
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2730
  fi
2839
  fi
2731
2840
2732
  # Commands to make compiler produce verbose output that lists
2841
  # Commands to make compiler produce verbose output that lists
Lines 2756-2763 Link Here
2756
      exp_sym_flag='-Bexport'
2865
      exp_sym_flag='-Bexport'
2757
      no_entry_flag=""
2866
      no_entry_flag=""
2758
    else
2867
    else
2759
      # KDE requires run time linking.  Make it the default.
2868
      aix_use_runtimelinking=no
2760
      aix_use_runtimelinking=yes
2869
2870
      # Test if we are trying to use run time linking or normal
2871
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2872
      # need to do runtime linking.
2873
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2874
	for ld_flag in $LDFLAGS; do
2875
	  case $ld_flag in
2876
	  *-brtl*)
2877
	    aix_use_runtimelinking=yes
2878
	    break
2879
	    ;;
2880
	  esac
2881
	done
2882
	;;
2883
      esac
2884
2761
      exp_sym_flag='-bexport'
2885
      exp_sym_flag='-bexport'
2762
      no_entry_flag='-bnoentry'
2886
      no_entry_flag='-bnoentry'
2763
    fi
2887
    fi
Lines 2774-2780 Link Here
2774
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2898
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2775
2899
2776
    if test "$GXX" = yes; then
2900
    if test "$GXX" = yes; then
2777
      case $host_os in aix4.[012]|aix4.[012].*)
2901
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2778
      # We only want to do this on AIX 4.2 and lower, the check
2902
      # We only want to do this on AIX 4.2 and lower, the check
2779
      # below for broken collect2 doesn't work under 4.3+
2903
      # below for broken collect2 doesn't work under 4.3+
2780
	collect2name=`${CC} -print-prog-name=collect2`
2904
	collect2name=`${CC} -print-prog-name=collect2`
Lines 2793-2800 Link Here
2793
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2917
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2794
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2918
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2795
	fi
2919
	fi
2920
	;;
2796
      esac
2921
      esac
2797
      shared_flag='-shared'
2922
      shared_flag='-shared'
2923
      if test "$aix_use_runtimelinking" = yes; then
2924
	shared_flag="$shared_flag "'${wl}-G'
2925
      fi
2798
    else
2926
    else
2799
      # not using gcc
2927
      # not using gcc
2800
      if test "$host_cpu" = ia64; then
2928
      if test "$host_cpu" = ia64; then
Lines 2803-2817 Link Here
2803
	shared_flag='-G'
2931
	shared_flag='-G'
2804
      else
2932
      else
2805
	if test "$aix_use_runtimelinking" = yes; then
2933
	if test "$aix_use_runtimelinking" = yes; then
2806
	  shared_flag='-qmkshrobj ${wl}-G'
2934
	  shared_flag='${wl}-G'
2807
	else
2935
	else
2808
	  shared_flag='-qmkshrobj'
2936
	  shared_flag='${wl}-bM:SRE'
2809
	fi
2937
	fi
2810
      fi
2938
      fi
2811
    fi
2939
    fi
2812
2940
2813
    # Let the compiler handle the export list.
2941
    # It seems that -bexpall does not export symbols beginning with
2814
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
2942
    # underscore (_), so it is better to generate a list of symbols to export.
2943
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2815
    if test "$aix_use_runtimelinking" = yes; then
2944
    if test "$aix_use_runtimelinking" = yes; then
2816
      # Warning - without using the other runtime loading flags (-brtl),
2945
      # Warning - without using the other runtime loading flags (-brtl),
2817
      # -berok will link without error, but may produce a broken library.
2946
      # -berok will link without error, but may produce a broken library.
Lines 2820-2832 Link Here
2820
      _LT_AC_SYS_LIBPATH_AIX
2949
      _LT_AC_SYS_LIBPATH_AIX
2821
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2950
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2822
2951
2823
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
2952
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2824
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2825
     else
2953
     else
2826
      if test "$host_cpu" = ia64; then
2954
      if test "$host_cpu" = ia64; then
2827
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2955
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2828
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2956
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2829
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2957
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
2830
      else
2958
      else
2831
	# Determine the default libpath from the value encoded in an empty executable.
2959
	# Determine the default libpath from the value encoded in an empty executable.
2832
	_LT_AC_SYS_LIBPATH_AIX
2960
	_LT_AC_SYS_LIBPATH_AIX
Lines 2835-2850 Link Here
2835
	# -berok will link without error, but may produce a broken library.
2963
	# -berok will link without error, but may produce a broken library.
2836
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2964
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2837
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2965
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2838
	# -bexpall does not export symbols beginning with underscore (_)
2839
	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
2840
	# Exported symbols can be pulled into shared objects from archives
2966
	# Exported symbols can be pulled into shared objects from archives
2841
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2967
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2842
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2968
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2843
	# This is similar to how AIX traditionally builds it's shared libraries.
2969
	# This is similar to how AIX traditionally builds its shared libraries.
2844
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2970
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2845
      fi
2971
      fi
2846
    fi
2972
    fi
2847
    ;;
2973
    ;;
2974
2975
  beos*)
2976
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
2977
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2978
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2979
      # support --undefined.  This deserves some investigation.  FIXME
2980
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2981
    else
2982
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2983
    fi
2984
    ;;
2985
2848
  chorus*)
2986
  chorus*)
2849
    case $cc_basename in
2987
    case $cc_basename in
2850
      *)
2988
      *)
Lines 2858-2869 Link Here
2858
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2996
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2859
    # as there is no search path for DLLs.
2997
    # as there is no search path for DLLs.
2860
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2998
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2861
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
2999
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2862
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3000
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
2863
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3001
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2864
3002
2865
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3003
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2866
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3004
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
2867
      # If the export-symbols file already is a .def file (1st line
3005
      # If the export-symbols file already is a .def file (1st line
2868
      # is EXPORTS), use it as is; otherwise, prepend...
3006
      # is EXPORTS), use it as is; otherwise, prepend...
2869
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3007
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Lines 2872-2941 Link Here
2872
	echo EXPORTS > $output_objdir/$soname.def;
3010
	echo EXPORTS > $output_objdir/$soname.def;
2873
	cat $export_symbols >> $output_objdir/$soname.def;
3011
	cat $export_symbols >> $output_objdir/$soname.def;
2874
      fi~
3012
      fi~
2875
      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3013
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
2876
    else
3014
    else
2877
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3015
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2878
    fi
3016
    fi
2879
  ;;
3017
  ;;
3018
      darwin* | rhapsody*)
3019
        case $host_os in
3020
        rhapsody* | darwin1.[[012]])
3021
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3022
         ;;
3023
       *) # Darwin 1.3 on
3024
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3025
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3026
         else
3027
           case ${MACOSX_DEPLOYMENT_TARGET} in
3028
             10.[[012]])
3029
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3030
               ;;
3031
             10.*)
3032
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3033
               ;;
3034
           esac
3035
         fi
3036
         ;;
3037
        esac
3038
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3039
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3040
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3041
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3042
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3043
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2880
3044
2881
  darwin* | rhapsody*)
3045
    if test "$GXX" = yes ; then
2882
  if test "$GXX" = yes; then
3046
      lt_int_apple_cc_single_mod=no
2883
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3047
      output_verbose_link_cmd='echo'
2884
    case "$host_os" in
3048
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
2885
    rhapsody* | darwin1.[[012]])
3049
       lt_int_apple_cc_single_mod=yes
2886
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
3050
      fi
2887
      ;;
3051
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2888
    *) # Darwin 1.3 on
3052
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2889
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3053
      else
2890
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
3054
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2891
      else
3055
        fi
2892
	case ${MACOSX_DEPLOYMENT_TARGET} in
3056
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2893
	  10.[012])
3057
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
2894
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
3058
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2895
	    ;;
3059
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2896
	  10.*)
3060
          else
2897
	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
3061
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2898
	    ;;
3062
          fi
2899
	esac
3063
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2900
      fi
3064
      else
2901
      ;;
3065
      case $cc_basename in
2902
    esac
3066
        xlc*)
2903
    lt_int_apple_cc_single_mod=no
3067
         output_verbose_link_cmd='echo'
2904
    output_verbose_link_cmd='echo'
3068
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
2905
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3069
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2906
      lt_int_apple_cc_single_mod=yes
3070
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
2907
    fi
3071
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2908
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3072
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2909
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
3073
          ;;
2910
    else
3074
       *)
2911
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
3075
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
2912
    fi
3076
          ;;
2913
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
3077
      esac
2914
3078
      fi
2915
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3079
        ;;
2916
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2917
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2918
    else
2919
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2920
    fi
2921
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2922
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
2923
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2924
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2925
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2926
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2927
  else
2928
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2929
  fi
2930
    ;;
2931
3080
2932
  dgux*)
3081
  dgux*)
2933
    case $cc_basename in
3082
    case $cc_basename in
2934
      ec++)
3083
      ec++*)
2935
	# FIXME: insert proper C++ library support
3084
	# FIXME: insert proper C++ library support
2936
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3085
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
2937
	;;
3086
	;;
2938
      ghcx)
3087
      ghcx*)
2939
	# Green Hills C++ Compiler
3088
	# Green Hills C++ Compiler
2940
	# FIXME: insert proper C++ library support
3089
	# FIXME: insert proper C++ library support
2941
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3090
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
Lines 2946-2959 Link Here
2946
	;;
3095
	;;
2947
    esac
3096
    esac
2948
    ;;
3097
    ;;
2949
  freebsd[12]*)
3098
  freebsd[[12]]*)
2950
    # C++ shared libraries reported to be fairly broken before switch to ELF
3099
    # C++ shared libraries reported to be fairly broken before switch to ELF
2951
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3100
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2952
    ;;
3101
    ;;
2953
  freebsd-elf*)
3102
  freebsd-elf*)
2954
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3103
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2955
    ;;
3104
    ;;
2956
  freebsd* | kfreebsd*-gnu)
3105
  freebsd* | dragonfly*)
2957
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3106
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2958
    # conventions
3107
    # conventions
2959
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3108
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
Lines 2970-2981 Link Here
2970
				# location of the library.
3119
				# location of the library.
2971
3120
2972
    case $cc_basename in
3121
    case $cc_basename in
2973
    CC)
3122
    CC*)
2974
      # FIXME: insert proper C++ library support
3123
      # FIXME: insert proper C++ library support
2975
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3124
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2976
      ;;
3125
      ;;
2977
    aCC)
3126
    aCC*)
2978
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3127
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
2979
      # Commands to make compiler produce verbose output that lists
3128
      # Commands to make compiler produce verbose output that lists
2980
      # what "hidden" libraries, object files and flags are used when
3129
      # what "hidden" libraries, object files and flags are used when
2981
      # linking a shared library.
3130
      # linking a shared library.
Lines 2984-2994 Link Here
2984
      # explicitly linking system object files so we need to strip them
3133
      # explicitly linking system object files so we need to strip them
2985
      # from the output so that they don't get included in the library
3134
      # from the output so that they don't get included in the library
2986
      # dependencies.
3135
      # dependencies.
2987
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3136
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2988
      ;;
3137
      ;;
2989
    *)
3138
    *)
2990
      if test "$GXX" = yes; then
3139
      if test "$GXX" = yes; then
2991
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3140
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
2992
      else
3141
      else
2993
        # FIXME: insert proper C++ library support
3142
        # FIXME: insert proper C++ library support
2994
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3143
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
Lines 2998-3030 Link Here
2998
    ;;
3147
    ;;
2999
  hpux10*|hpux11*)
3148
  hpux10*|hpux11*)
3000
    if test $with_gnu_ld = no; then
3149
    if test $with_gnu_ld = no; then
3001
      case "$host_cpu" in
3150
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3002
      hppa*64*)
3151
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3003
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3152
3153
      case $host_cpu in
3154
      hppa*64*|ia64*)
3004
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3155
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3005
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3006
        ;;
3007
      ia64*)
3008
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3009
        ;;
3156
        ;;
3010
      *)
3157
      *)
3011
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3012
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3013
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3158
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3014
        ;;
3159
        ;;
3015
      esac
3160
      esac
3016
    fi
3161
    fi
3017
    case "$host_cpu" in
3162
    case $host_cpu in
3018
    hppa*64*)
3163
    hppa*64*|ia64*)
3019
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3020
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3021
      ;;
3022
    ia64*)
3023
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3164
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3024
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3165
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3025
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3026
					      # but as the default
3027
					      # location of the library.
3028
      ;;
3166
      ;;
3029
    *)
3167
    *)
3030
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3168
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Lines 3035-3051 Link Here
3035
    esac
3173
    esac
3036
3174
3037
    case $cc_basename in
3175
    case $cc_basename in
3038
      CC)
3176
      CC*)
3039
	# FIXME: insert proper C++ library support
3177
	# FIXME: insert proper C++ library support
3040
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3178
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3041
	;;
3179
	;;
3042
      aCC)
3180
      aCC*)
3043
	case "$host_cpu" in
3181
	case $host_cpu in
3044
	hppa*64*|ia64*)
3182
	hppa*64*)
3045
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3183
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3184
	  ;;
3185
	ia64*)
3186
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3046
	  ;;
3187
	  ;;
3047
	*)
3188
	*)
3048
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
3189
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3049
	  ;;
3190
	  ;;
3050
	esac
3191
	esac
3051
	# Commands to make compiler produce verbose output that lists
3192
	# Commands to make compiler produce verbose output that lists
Lines 3061-3072 Link Here
3061
      *)
3202
      *)
3062
	if test "$GXX" = yes; then
3203
	if test "$GXX" = yes; then
3063
	  if test $with_gnu_ld = no; then
3204
	  if test $with_gnu_ld = no; then
3064
	    case "$host_cpu" in
3205
	    case $host_cpu in
3065
	    ia64*|hppa*64*)
3206
	    hppa*64*)
3066
	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3207
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3208
	      ;;
3209
	    ia64*)
3210
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3067
	      ;;
3211
	      ;;
3068
	    *)
3212
	    *)
3069
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
3213
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3070
	      ;;
3214
	      ;;
3071
	    esac
3215
	    esac
3072
	  fi
3216
	  fi
Lines 3077-3087 Link Here
3077
	;;
3221
	;;
3078
    esac
3222
    esac
3079
    ;;
3223
    ;;
3224
  interix3*)
3225
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3226
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3227
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3228
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3229
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3230
    # Instead, shared libraries are loaded at an image base (0x10000000 by
3231
    # default) and relocated if they conflict, which is a slow very memory
3232
    # consuming and fragmenting process.  To avoid this, we pick a random,
3233
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3234
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3235
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3236
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3237
    ;;
3080
  irix5* | irix6*)
3238
  irix5* | irix6*)
3081
    case $cc_basename in
3239
    case $cc_basename in
3082
      CC)
3240
      CC*)
3083
	# SGI C++
3241
	# SGI C++
3084
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3242
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3085
3243
3086
	# Archives containing C++ object files must be created using
3244
	# Archives containing C++ object files must be created using
3087
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3245
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
Lines 3092-3100 Link Here
3092
      *)
3250
      *)
3093
	if test "$GXX" = yes; then
3251
	if test "$GXX" = yes; then
3094
	  if test "$with_gnu_ld" = no; then
3252
	  if test "$with_gnu_ld" = no; then
3095
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3253
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3096
	  else
3254
	  else
3097
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3255
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3098
	  fi
3256
	  fi
3099
	fi
3257
	fi
3100
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3258
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Lines 3103-3118 Link Here
3103
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3261
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3104
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3262
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3105
    ;;
3263
    ;;
3106
  linux*)
3264
  linux* | k*bsd*-gnu)
3107
    case $cc_basename in
3265
    case $cc_basename in
3108
      KCC)
3266
      KCC*)
3109
	# Kuck and Associates, Inc. (KAI) C++ Compiler
3267
	# Kuck and Associates, Inc. (KAI) C++ Compiler
3110
3268
3111
	# KCC will only create a shared library if the output file
3269
	# KCC will only create a shared library if the output file
3112
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3270
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3113
	# to its proper name (with version) after linking.
3271
	# to its proper name (with version) after linking.
3114
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
3272
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3115
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3273
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3116
	# Commands to make compiler produce verbose output that lists
3274
	# Commands to make compiler produce verbose output that lists
3117
	# what "hidden" libraries, object files and flags are used when
3275
	# what "hidden" libraries, object files and flags are used when
3118
	# linking a shared library.
3276
	# linking a shared library.
Lines 3130-3149 Link Here
3130
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3288
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3131
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3289
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3132
	;;
3290
	;;
3133
      icpc)
3291
      icpc*)
3134
	# Intel C++
3292
	# Intel C++
3135
	with_gnu_ld=yes
3293
	with_gnu_ld=yes
3294
	# version 8.0 and above of icpc choke on multiply defined symbols
3295
	# if we add $predep_objects and $postdep_objects, however 7.1 and
3296
	# earlier do not add the objects themselves.
3297
	case `$CC -V 2>&1` in
3298
	*"Version 7."*)
3299
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3300
  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3301
	  ;;
3302
	*)  # Version 8.0 or newer
3303
	  tmp_idyn=
3304
	  case $host_cpu in
3305
	    ia64*) tmp_idyn=' -i_dynamic';;
3306
	  esac
3307
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3308
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3309
	  ;;
3310
	esac
3136
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3311
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3137
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
3138
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3139
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3312
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3140
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3313
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3141
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3314
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3142
	;;
3315
	;;
3143
      cxx)
3316
      pgCC*)
3317
        # Portland Group C++ compiler
3318
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3319
  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3320
3321
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3322
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3323
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3324
        ;;
3325
      cxx*)
3144
	# Compaq C++
3326
	# Compaq C++
3145
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
3327
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3146
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3328
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3147
3329
3148
	runpath_var=LD_RUN_PATH
3330
	runpath_var=LD_RUN_PATH
3149
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3331
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Lines 3171-3177 Link Here
3171
    ;;
3353
    ;;
3172
  mvs*)
3354
  mvs*)
3173
    case $cc_basename in
3355
    case $cc_basename in
3174
      cxx)
3356
      cxx*)
3175
	# FIXME: insert proper C++ library support
3357
	# FIXME: insert proper C++ library support
3176
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3358
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3177
	;;
3359
	;;
Lines 3181-3187 Link Here
3181
	;;
3363
	;;
3182
    esac
3364
    esac
3183
    ;;
3365
    ;;
3184
  netbsd*)
3366
  netbsd* | netbsdelf*-gnu)
3185
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3367
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3186
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3368
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3187
      wlarc=
3369
      wlarc=
Lines 3192-3206 Link Here
3192
    # Workaround some broken pre-1.5 toolchains
3374
    # Workaround some broken pre-1.5 toolchains
3193
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3375
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3194
    ;;
3376
    ;;
3377
  openbsd2*)
3378
    # C++ shared libraries are fairly broken
3379
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3380
    ;;
3381
  openbsd*)
3382
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3383
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3384
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3385
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3386
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3387
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3388
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3389
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3390
    fi
3391
    output_verbose_link_cmd='echo'
3392
    ;;
3195
  osf3*)
3393
  osf3*)
3196
    case $cc_basename in
3394
    case $cc_basename in
3197
      KCC)
3395
      KCC*)
3198
	# Kuck and Associates, Inc. (KAI) C++ Compiler
3396
	# Kuck and Associates, Inc. (KAI) C++ Compiler
3199
3397
3200
	# KCC will only create a shared library if the output file
3398
	# KCC will only create a shared library if the output file
3201
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3399
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3202
	# to its proper name (with version) after linking.
3400
	# to its proper name (with version) after linking.
3203
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
3401
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3204
3402
3205
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3403
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3206
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3404
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Lines 3210-3223 Link Here
3210
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3408
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3211
3409
3212
	;;
3410
	;;
3213
      RCC)
3411
      RCC*)
3214
	# Rational C++ 2.4.1
3412
	# Rational C++ 2.4.1
3215
	# FIXME: insert proper C++ library support
3413
	# FIXME: insert proper C++ library support
3216
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3414
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3217
	;;
3415
	;;
3218
      cxx)
3416
      cxx*)
3219
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3417
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3220
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3418
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3221
3419
3222
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3420
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3223
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3421
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Lines 3235-3241 Link Here
3235
      *)
3433
      *)
3236
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3434
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3237
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3435
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3238
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3436
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3239
3437
3240
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3438
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3241
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3439
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Lines 3254-3266 Link Here
3254
    ;;
3452
    ;;
3255
  osf4* | osf5*)
3453
  osf4* | osf5*)
3256
    case $cc_basename in
3454
    case $cc_basename in
3257
      KCC)
3455
      KCC*)
3258
	# Kuck and Associates, Inc. (KAI) C++ Compiler
3456
	# Kuck and Associates, Inc. (KAI) C++ Compiler
3259
3457
3260
	# KCC will only create a shared library if the output file
3458
	# KCC will only create a shared library if the output file
3261
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3459
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3262
	# to its proper name (with version) after linking.
3460
	# to its proper name (with version) after linking.
3263
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
3461
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3264
3462
3265
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3463
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3266
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3464
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Lines 3269-3285 Link Here
3269
	# the KAI C++ compiler.
3467
	# the KAI C++ compiler.
3270
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3468
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3271
	;;
3469
	;;
3272
      RCC)
3470
      RCC*)
3273
	# Rational C++ 2.4.1
3471
	# Rational C++ 2.4.1
3274
	# FIXME: insert proper C++ library support
3472
	# FIXME: insert proper C++ library support
3275
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3473
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3276
	;;
3474
	;;
3277
      cxx)
3475
      cxx*)
3278
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3476
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3279
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3477
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3280
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3478
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3281
	  echo "-hidden">> $lib.exp~
3479
	  echo "-hidden">> $lib.exp~
3282
	  $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
3480
	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3283
	  $rm $lib.exp'
3481
	  $rm $lib.exp'
3284
3482
3285
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3483
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Lines 3298-3304 Link Here
3298
      *)
3496
      *)
3299
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3497
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3300
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3498
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3301
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3499
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3302
3500
3303
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3501
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3304
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3502
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Lines 3319-3345 Link Here
3319
    # FIXME: insert proper C++ library support
3517
    # FIXME: insert proper C++ library support
3320
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3518
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3321
    ;;
3519
    ;;
3322
  sco*)
3323
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3324
    case $cc_basename in
3325
      CC)
3326
	# FIXME: insert proper C++ library support
3327
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3328
	;;
3329
      *)
3330
	# FIXME: insert proper C++ library support
3331
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3332
	;;
3333
    esac
3334
    ;;
3335
  sunos4*)
3520
  sunos4*)
3336
    case $cc_basename in
3521
    case $cc_basename in
3337
      CC)
3522
      CC*)
3338
	# Sun C++ 4.x
3523
	# Sun C++ 4.x
3339
	# FIXME: insert proper C++ library support
3524
	# FIXME: insert proper C++ library support
3340
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3525
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3341
	;;
3526
	;;
3342
      lcc)
3527
      lcc*)
3343
	# Lucid
3528
	# Lucid
3344
	# FIXME: insert proper C++ library support
3529
	# FIXME: insert proper C++ library support
3345
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3530
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
Lines 3352-3387 Link Here
3352
    ;;
3537
    ;;
3353
  solaris*)
3538
  solaris*)
3354
    case $cc_basename in
3539
    case $cc_basename in
3355
      CC)
3540
      CC*)
3356
	# Sun C++ 4.2, 5.x and Centerline C++
3541
	# Sun C++ 4.2, 5.x and Centerline C++
3542
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3357
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3543
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3358
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
3544
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3359
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3545
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3360
	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
3546
	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3361
3547
3362
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3548
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3363
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3549
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3364
	case $host_os in
3550
	case $host_os in
3365
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
3551
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3366
	  *)
3552
	  *)
3367
	    # The C++ compiler is used as linker so we must use $wl
3553
	    # The C++ compiler is used as linker so we must use $wl
3368
	    # flag to pass the commands to the underlying system
3554
	    # flag to pass the commands to the underlying system
3369
	    # linker.
3555
	    # linker. We must also pass each convience library through
3556
	    # to the system linker between allextract/defaultextract.
3557
	    # The C++ compiler will combine linker options so we
3558
	    # cannot just pass the convience library names through
3559
	    # without $wl.
3370
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3560
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3371
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3561
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3372
	    ;;
3562
	    ;;
3373
	esac
3563
	esac
3374
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3564
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3375
3565
3376
	# Commands to make compiler produce verbose output that lists
3566
	output_verbose_link_cmd='echo'
3377
	# what "hidden" libraries, object files and flags are used when
3378
	# linking a shared library.
3379
	#
3380
	# There doesn't appear to be a way to prevent this compiler from
3381
	# explicitly linking system object files so we need to strip them
3382
	# from the output so that they don't get included in the library
3383
	# dependencies.
3384
	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3385
3567
3386
	# Archives containing C++ object files must be created using
3568
	# Archives containing C++ object files must be created using
3387
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3569
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
Lines 3389-3397 Link Here
3389
	# in the archive.
3571
	# in the archive.
3390
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3572
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3391
	;;
3573
	;;
3392
      gcx)
3574
      gcx*)
3393
	# Green Hills C++ Compiler
3575
	# Green Hills C++ Compiler
3394
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
3576
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3395
3577
3396
	# The C++ compiler must be used to create the archive.
3578
	# The C++ compiler must be used to create the archive.
3397
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3579
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Lines 3401-3409 Link Here
3401
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3583
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3402
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3584
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3403
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3585
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3404
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
3586
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3405
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3587
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3406
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
3588
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3407
3589
3408
	    # Commands to make compiler produce verbose output that lists
3590
	    # Commands to make compiler produce verbose output that lists
3409
	    # what "hidden" libraries, object files and flags are used when
3591
	    # what "hidden" libraries, object files and flags are used when
Lines 3412-3420 Link Here
3412
	  else
3594
	  else
3413
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3595
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3414
	    # platform.
3596
	    # platform.
3415
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
3597
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3416
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3598
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3417
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
3599
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3418
3600
3419
	    # Commands to make compiler produce verbose output that lists
3601
	    # Commands to make compiler produce verbose output that lists
3420
	    # what "hidden" libraries, object files and flags are used when
3602
	    # what "hidden" libraries, object files and flags are used when
Lines 3427-3438 Link Here
3427
	;;
3609
	;;
3428
    esac
3610
    esac
3429
    ;;
3611
    ;;
3430
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3612
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3613
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3614
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3615
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3616
    runpath_var='LD_RUN_PATH'
3617
3618
    case $cc_basename in
3619
      CC*)
3620
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3621
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3622
	;;
3623
      *)
3624
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3625
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3626
	;;
3627
    esac
3628
    ;;
3629
  sysv5* | sco3.2v5* | sco5v6*)
3630
    # Note: We can NOT use -z defs as we might desire, because we do not
3631
    # link with -lc, and that would cause any symbols used from libc to
3632
    # always be unresolved, which means just about no library would
3633
    # ever link correctly.  If we're not using GNU ld we use -z text
3634
    # though, which does catch some bad symbols but isn't as heavy-handed
3635
    # as -z defs.
3636
    # For security reasons, it is highly recommended that you always
3637
    # use absolute paths for naming shared libraries, and exclude the
3638
    # DT_RUNPATH tag from executables and libraries.  But doing so
3639
    # requires that you compile everything twice, which is a pain.
3640
    # So that behaviour is only enabled if SCOABSPATH is set to a
3641
    # non-empty value in the environment.  Most likely only useful for
3642
    # creating official distributions of packages.
3643
    # This is a hack until libtool officially supports absolute path
3644
    # names for shared libraries.
3645
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3646
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3431
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3647
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3648
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3649
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3650
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3651
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3652
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3653
    runpath_var='LD_RUN_PATH'
3654
3655
    case $cc_basename in
3656
      CC*)
3657
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3658
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3659
	;;
3660
      *)
3661
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3662
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3663
	;;
3664
    esac
3432
    ;;
3665
    ;;
3433
  tandem*)
3666
  tandem*)
3434
    case $cc_basename in
3667
    case $cc_basename in
3435
      NCC)
3668
      NCC*)
3436
	# NonStop-UX NCC 3.20
3669
	# NonStop-UX NCC 3.20
3437
	# FIXME: insert proper C++ library support
3670
	# FIXME: insert proper C++ library support
3438
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3671
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
Lines 3469-3476 Link Here
3469
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3702
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3470
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3703
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3471
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3704
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3472
AC_LIBTOOL_SYS_LIB_STRIP
3473
AC_LIBTOOL_DLOPEN_SELF($1)
3474
3705
3475
AC_LIBTOOL_CONFIG($1)
3706
AC_LIBTOOL_CONFIG($1)
3476
3707
Lines 3488-3494 Link Here
3488
])# AC_LIBTOOL_LANG_CXX_CONFIG
3719
])# AC_LIBTOOL_LANG_CXX_CONFIG
3489
3720
3490
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3721
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3491
# ------------------------
3722
# ------------------------------------
3492
# Figure out "hidden" library dependencies from verbose
3723
# Figure out "hidden" library dependencies from verbose
3493
# compiler output when linking a shared library.
3724
# compiler output when linking a shared library.
3494
# Parse the compiler output and extract the necessary
3725
# Parse the compiler output and extract the necessary
Lines 3542-3548 Link Here
3542
  # The `*' in the case matches for architectures that use `case' in
3773
  # The `*' in the case matches for architectures that use `case' in
3543
  # $output_verbose_cmd can trigger glob expansion during the loop
3774
  # $output_verbose_cmd can trigger glob expansion during the loop
3544
  # eval without this substitution.
3775
  # eval without this substitution.
3545
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3776
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3546
3777
3547
  for p in `eval $output_verbose_link_cmd`; do
3778
  for p in `eval $output_verbose_link_cmd`; do
3548
    case $p in
3779
    case $p in
Lines 3582-3588 Link Here
3582
       fi
3813
       fi
3583
       ;;
3814
       ;;
3584
3815
3585
    *.$objext|*.$libext)
3816
    *.$objext)
3586
       # This assumes that the test object file only shows up
3817
       # This assumes that the test object file only shows up
3587
       # once in the compiler output.
3818
       # once in the compiler output.
3588
       if test "$p" = "conftest.$objext"; then
3819
       if test "$p" = "conftest.$objext"; then
Lines 3618-3630 Link Here
3618
3849
3619
$rm -f confest.$objext
3850
$rm -f confest.$objext
3620
3851
3852
# PORTME: override above test on systems where it is broken
3853
ifelse([$1],[CXX],
3854
[case $host_os in
3855
interix3*)
3856
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3857
  # hack all around it, let's just trust "g++" to DTRT.
3858
  _LT_AC_TAGVAR(predep_objects,$1)=
3859
  _LT_AC_TAGVAR(postdep_objects,$1)=
3860
  _LT_AC_TAGVAR(postdeps,$1)=
3861
  ;;
3862
3863
solaris*)
3864
  case $cc_basename in
3865
  CC*)
3866
    # Adding this requires a known-good setup of shared libraries for
3867
    # Sun compiler versions before 5.6, else PIC objects from an old
3868
    # archive will be linked into the output, leading to subtle bugs.
3869
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3870
    ;;
3871
  esac
3872
  ;;
3873
esac
3874
])
3875
3621
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3876
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3622
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3877
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3623
esac
3878
esac
3624
])# AC_LIBTOOL_POSTDEP_PREDEP
3879
])# AC_LIBTOOL_POSTDEP_PREDEP
3625
3880
3626
# AC_LIBTOOL_LANG_F77_CONFIG
3881
# AC_LIBTOOL_LANG_F77_CONFIG
3627
# ------------------------
3882
# --------------------------
3628
# Ensure that the configuration vars for the C compiler are
3883
# Ensure that the configuration vars for the C compiler are
3629
# suitably defined.  Those variables are subsequently used by
3884
# suitably defined.  Those variables are subsequently used by
3630
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3885
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Lines 3668-3679 Link Here
3668
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3923
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3669
_LT_AC_SYS_COMPILER
3924
_LT_AC_SYS_COMPILER
3670
3925
3926
# save warnings/boilerplate of simple test code
3927
_LT_COMPILER_BOILERPLATE
3928
_LT_LINKER_BOILERPLATE
3929
3671
# Allow CC to be a program name with arguments.
3930
# Allow CC to be a program name with arguments.
3672
lt_save_CC="$CC"
3931
lt_save_CC="$CC"
3673
CC=${F77-"f77"}
3932
CC=${F77-"f77"}
3674
compiler=$CC
3933
compiler=$CC
3675
_LT_AC_TAGVAR(compiler, $1)=$CC
3934
_LT_AC_TAGVAR(compiler, $1)=$CC
3676
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3935
_LT_CC_BASENAME([$compiler])
3677
3936
3678
AC_MSG_CHECKING([if libtool supports shared libraries])
3937
AC_MSG_CHECKING([if libtool supports shared libraries])
3679
AC_MSG_RESULT([$can_build_shared])
3938
AC_MSG_RESULT([$can_build_shared])
Lines 3683-3689 Link Here
3683
3942
3684
# On AIX, shared libraries and static libraries use the same namespace, and
3943
# On AIX, shared libraries and static libraries use the same namespace, and
3685
# are all built from PIC.
3944
# are all built from PIC.
3686
case "$host_os" in
3945
case $host_os in
3687
aix3*)
3946
aix3*)
3688
  test "$enable_shared" = yes && enable_static=no
3947
  test "$enable_shared" = yes && enable_static=no
3689
  if test -n "$RANLIB"; then
3948
  if test -n "$RANLIB"; then
Lines 3691-3698 Link Here
3691
    postinstall_cmds='$RANLIB $lib'
3950
    postinstall_cmds='$RANLIB $lib'
3692
  fi
3951
  fi
3693
  ;;
3952
  ;;
3694
aix4*)
3953
aix4* | aix5*)
3695
  test "$enable_shared" = yes && enable_static=no
3954
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3955
    test "$enable_shared" = yes && enable_static=no
3956
  fi
3696
  ;;
3957
  ;;
3697
esac
3958
esac
3698
AC_MSG_RESULT([$enable_shared])
3959
AC_MSG_RESULT([$enable_shared])
Lines 3702-3709 Link Here
3702
test "$enable_shared" = yes || enable_static=yes
3963
test "$enable_shared" = yes || enable_static=yes
3703
AC_MSG_RESULT([$enable_static])
3964
AC_MSG_RESULT([$enable_static])
3704
3965
3705
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3706
3707
_LT_AC_TAGVAR(GCC, $1)="$G77"
3966
_LT_AC_TAGVAR(GCC, $1)="$G77"
3708
_LT_AC_TAGVAR(LD, $1)="$LD"
3967
_LT_AC_TAGVAR(LD, $1)="$LD"
3709
3968
Lines 3713-3720 Link Here
3713
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3972
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3714
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3973
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3715
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3974
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3716
AC_LIBTOOL_SYS_LIB_STRIP
3717
3718
3975
3719
AC_LIBTOOL_CONFIG($1)
3976
AC_LIBTOOL_CONFIG($1)
3720
3977
Lines 3743-3762 Link Here
3743
lt_simple_compile_test_code="class foo {}\n"
4000
lt_simple_compile_test_code="class foo {}\n"
3744
4001
3745
# Code to be used in simple link tests
4002
# Code to be used in simple link tests
3746
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4003
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
3747
4004
3748
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4005
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3749
_LT_AC_SYS_COMPILER
4006
_LT_AC_SYS_COMPILER
3750
4007
4008
# save warnings/boilerplate of simple test code
4009
_LT_COMPILER_BOILERPLATE
4010
_LT_LINKER_BOILERPLATE
4011
3751
# Allow CC to be a program name with arguments.
4012
# Allow CC to be a program name with arguments.
3752
lt_save_CC="$CC"
4013
lt_save_CC="$CC"
3753
CC=${GCJ-"gcj"}
4014
CC=${GCJ-"gcj"}
3754
compiler=$CC
4015
compiler=$CC
3755
_LT_AC_TAGVAR(compiler, $1)=$CC
4016
_LT_AC_TAGVAR(compiler, $1)=$CC
4017
_LT_CC_BASENAME([$compiler])
3756
4018
3757
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4019
# GCJ did not exist at the time GCC didn't implicitly link libc in.
3758
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4020
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3759
4021
4022
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4023
3760
## CAVEAT EMPTOR:
4024
## CAVEAT EMPTOR:
3761
## There is no encapsulation within the following macros, do not change
4025
## There is no encapsulation within the following macros, do not change
3762
## the running order or otherwise move them around unless you know exactly
4026
## the running order or otherwise move them around unless you know exactly
Lines 3768-3775 Link Here
3768
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4032
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3769
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4033
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3770
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4034
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3771
AC_LIBTOOL_SYS_LIB_STRIP
3772
AC_LIBTOOL_DLOPEN_SELF($1)
3773
4035
3774
AC_LIBTOOL_CONFIG($1)
4036
AC_LIBTOOL_CONFIG($1)
3775
4037
Lines 3779-3785 Link Here
3779
4041
3780
4042
3781
# AC_LIBTOOL_LANG_RC_CONFIG
4043
# AC_LIBTOOL_LANG_RC_CONFIG
3782
# --------------------------
4044
# -------------------------
3783
# Ensure that the configuration vars for the Windows resource compiler are
4045
# Ensure that the configuration vars for the Windows resource compiler are
3784
# suitably defined.  Those variables are subsequently used by
4046
# suitably defined.  Those variables are subsequently used by
3785
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4047
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Lines 3803-3813 Link Here
3803
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4065
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3804
_LT_AC_SYS_COMPILER
4066
_LT_AC_SYS_COMPILER
3805
4067
4068
# save warnings/boilerplate of simple test code
4069
_LT_COMPILER_BOILERPLATE
4070
_LT_LINKER_BOILERPLATE
4071
3806
# Allow CC to be a program name with arguments.
4072
# Allow CC to be a program name with arguments.
3807
lt_save_CC="$CC"
4073
lt_save_CC="$CC"
3808
CC=${RC-"windres"}
4074
CC=${RC-"windres"}
3809
compiler=$CC
4075
compiler=$CC
3810
_LT_AC_TAGVAR(compiler, $1)=$CC
4076
_LT_AC_TAGVAR(compiler, $1)=$CC
4077
_LT_CC_BASENAME([$compiler])
3811
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4078
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3812
4079
3813
AC_LIBTOOL_CONFIG($1)
4080
AC_LIBTOOL_CONFIG($1)
Lines 3833-3843 Link Here
3833
  # without removal of \ escapes.
4100
  # without removal of \ escapes.
3834
  if test -n "${ZSH_VERSION+set}" ; then
4101
  if test -n "${ZSH_VERSION+set}" ; then
3835
    setopt NO_GLOB_SUBST
4102
    setopt NO_GLOB_SUBST
3836
  fi  
4103
  fi
3837
  # Now quote all the things that may contain metacharacters while being
4104
  # Now quote all the things that may contain metacharacters while being
3838
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4105
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3839
  # variables and quote the copies for generation of the libtool script.
4106
  # variables and quote the copies for generation of the libtool script.
3840
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4107
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4108
    SED SHELL STRIP \
3841
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4109
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3842
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4110
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3843
    deplibs_check_method reload_flag reload_cmds need_locks \
4111
    deplibs_check_method reload_flag reload_cmds need_locks \
Lines 3887-3893 Link Here
3887
    _LT_AC_TAGVAR(archive_cmds, $1) | \
4155
    _LT_AC_TAGVAR(archive_cmds, $1) | \
3888
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4156
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3889
    _LT_AC_TAGVAR(module_cmds, $1) | \
4157
    _LT_AC_TAGVAR(module_cmds, $1) | \
3890
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
4158
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
3891
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4159
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3892
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4160
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3893
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4161
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
Lines 3953-3963 Link Here
3953
SED=$lt_SED
4221
SED=$lt_SED
3954
4222
3955
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4223
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3956
Xsed="$SED -e s/^X//"
4224
Xsed="$SED -e 1s/^X//"
3957
4225
3958
# The HP-UX ksh and POSIX shell print the target directory to stdout
4226
# The HP-UX ksh and POSIX shell print the target directory to stdout
3959
# if CDPATH is set.
4227
# if CDPATH is set.
3960
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4228
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3961
4229
3962
# The names of the tagged configurations supported by this script.
4230
# The names of the tagged configurations supported by this script.
3963
available_tags=
4231
available_tags=
Lines 3988-3993 Link Here
3988
# The host system.
4256
# The host system.
3989
host_alias=$host_alias
4257
host_alias=$host_alias
3990
host=$host
4258
host=$host
4259
host_os=$host_os
4260
4261
# The build system.
4262
build_alias=$build_alias
4263
build=$build
4264
build_os=$build_os
3991
4265
3992
# An echo program that does not interpret backslashes.
4266
# An echo program that does not interpret backslashes.
3993
echo=$lt_echo
4267
echo=$lt_echo
Lines 3999-4004 Link Here
3999
# A C compiler.
4273
# A C compiler.
4000
LTCC=$lt_LTCC
4274
LTCC=$lt_LTCC
4001
4275
4276
# LTCC compiler flags.
4277
LTCFLAGS=$lt_LTCFLAGS
4278
4002
# A language-specific compiler.
4279
# A language-specific compiler.
4003
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4280
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4004
4281
Lines 4018-4024 Link Here
4018
NM=$lt_NM
4295
NM=$lt_NM
4019
4296
4020
# A symbol stripping program
4297
# A symbol stripping program
4021
STRIP=$STRIP
4298
STRIP=$lt_STRIP
4022
4299
4023
# Used to examine libraries when file_magic_cmd begins "file"
4300
# Used to examine libraries when file_magic_cmd begins "file"
4024
MAGIC_CMD=$MAGIC_CMD
4301
MAGIC_CMD=$MAGIC_CMD
Lines 4049-4055 Link Here
4049
libext="$libext"
4326
libext="$libext"
4050
4327
4051
# Shared library suffix (normally ".so").
4328
# Shared library suffix (normally ".so").
4052
shrext='$shrext'
4329
shrext_cmds='$shrext_cmds'
4053
4330
4054
# Executable file suffix (normally "").
4331
# Executable file suffix (normally "").
4055
exeext="$exeext"
4332
exeext="$exeext"
Lines 4064-4070 Link Here
4064
# Does compiler simultaneously support -c and -o options?
4341
# Does compiler simultaneously support -c and -o options?
4065
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4342
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4066
4343
4067
# Must we lock files when doing compilation ?
4344
# Must we lock files when doing compilation?
4068
need_locks=$lt_need_locks
4345
need_locks=$lt_need_locks
4069
4346
4070
# Do we need the lib prefix for modules?
4347
# Do we need the lib prefix for modules?
Lines 4293-4299 Link Here
4293
  # If there is no Makefile yet, we rely on a make rule to execute
4570
  # If there is no Makefile yet, we rely on a make rule to execute
4294
  # `config.status --recheck' to rerun these tests and create the
4571
  # `config.status --recheck' to rerun these tests and create the
4295
  # libtool script then.
4572
  # libtool script then.
4296
  test -f Makefile && make "$ltmain"
4573
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4574
  if test -f "$ltmain_in"; then
4575
    test -f Makefile && make "$ltmain"
4576
  fi
4297
fi
4577
fi
4298
])# AC_LIBTOOL_CONFIG
4578
])# AC_LIBTOOL_CONFIG
4299
4579
Lines 4335-4343 Link Here
4335
# Regexp to match symbols that can be accessed directly from C.
4615
# Regexp to match symbols that can be accessed directly from C.
4336
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4616
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4337
4617
4338
# Transform the above into a raw symbol and a C symbol.
4339
symxfrm='\1 \2\3 \3'
4340
4341
# Transform an extracted symbol line into a proper C declaration
4618
# Transform an extracted symbol line into a proper C declaration
4342
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4619
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4343
4620
Lines 4359-4372 Link Here
4359
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4636
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4360
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4637
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4361
  ;;
4638
  ;;
4639
linux* | k*bsd*-gnu)
4640
  if test "$host_cpu" = ia64; then
4641
    symcode='[[ABCDGIRSTW]]'
4642
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4643
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4644
  fi
4645
  ;;
4362
irix* | nonstopux*)
4646
irix* | nonstopux*)
4363
  symcode='[[BCDEGRST]]'
4647
  symcode='[[BCDEGRST]]'
4364
  ;;
4648
  ;;
4365
osf*)
4649
osf*)
4366
  symcode='[[BCDEGQRST]]'
4650
  symcode='[[BCDEGQRST]]'
4367
  ;;
4651
  ;;
4368
solaris* | sysv5*)
4652
solaris*)
4369
  symcode='[[BDT]]'
4653
  symcode='[[BDRT]]'
4654
  ;;
4655
sco3.2v5*)
4656
  symcode='[[DT]]'
4657
  ;;
4658
sysv4.2uw2*)
4659
  symcode='[[DT]]'
4660
  ;;
4661
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4662
  symcode='[[ABDT]]'
4370
  ;;
4663
  ;;
4371
sysv4)
4664
sysv4)
4372
  symcode='[[DFNSTU]]'
4665
  symcode='[[DFNSTU]]'
Lines 4384-4397 Link Here
4384
# If we're using GNU nm, then use its standard symbol codes.
4677
# If we're using GNU nm, then use its standard symbol codes.
4385
case `$NM -V 2>&1` in
4678
case `$NM -V 2>&1` in
4386
*GNU* | *'with BFD'*)
4679
*GNU* | *'with BFD'*)
4387
  symcode='[[ABCDGISTW]]' ;;
4680
  symcode='[[ABCDGIRSTW]]' ;;
4388
esac
4681
esac
4389
4682
4390
# Try without a prefix undercore, then with it.
4683
# Try without a prefix undercore, then with it.
4391
for ac_symprfx in "" "_"; do
4684
for ac_symprfx in "" "_"; do
4392
4685
4686
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4687
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4688
4393
  # Write the raw and C identifiers.
4689
  # Write the raw and C identifiers.
4394
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4690
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4395
4691
4396
  # Check to see that the pipe works correctly.
4692
  # Check to see that the pipe works correctly.
4397
  pipe_works=no
4693
  pipe_works=no
Lines 4547-4552 Link Here
4547
      # DJGPP does not support shared libraries at all
4843
      # DJGPP does not support shared libraries at all
4548
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4844
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4549
      ;;
4845
      ;;
4846
    interix3*)
4847
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4848
      # Instead, we relocate shared libraries at runtime.
4849
      ;;
4550
    sysv4*MP*)
4850
    sysv4*MP*)
4551
      if test -d /usr/nec; then
4851
      if test -d /usr/nec; then
4552
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4852
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Lines 4555-4561 Link Here
4555
    hpux*)
4855
    hpux*)
4556
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4856
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4557
      # not for PA HP-UX.
4857
      # not for PA HP-UX.
4558
      case "$host_cpu" in
4858
      case $host_cpu in
4559
      hppa*64*|ia64*)
4859
      hppa*64*|ia64*)
4560
	;;
4860
	;;
4561
      *)
4861
      *)
Lines 4580-4597 Link Here
4580
	;;
4880
	;;
4581
      chorus*)
4881
      chorus*)
4582
	case $cc_basename in
4882
	case $cc_basename in
4583
	cxch68)
4883
	cxch68*)
4584
	  # Green Hills C++ Compiler
4884
	  # Green Hills C++ Compiler
4585
	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4885
	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4586
	  ;;
4886
	  ;;
4587
	esac
4887
	esac
4588
	;;
4888
	;;
4889
       darwin*)
4890
         # PIC is the default on this platform
4891
         # Common symbols not allowed in MH_DYLIB files
4892
         case $cc_basename in
4893
           xlc*)
4894
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4895
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4896
           ;;
4897
         esac
4898
       ;;
4589
      dgux*)
4899
      dgux*)
4590
	case $cc_basename in
4900
	case $cc_basename in
4591
	  ec++)
4901
	  ec++*)
4592
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4902
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4593
	    ;;
4903
	    ;;
4594
	  ghcx)
4904
	  ghcx*)
4595
	    # Green Hills C++ Compiler
4905
	    # Green Hills C++ Compiler
4596
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4906
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4597
	    ;;
4907
	    ;;
Lines 4599-4620 Link Here
4599
	    ;;
4909
	    ;;
4600
	esac
4910
	esac
4601
	;;
4911
	;;
4602
      freebsd* | kfreebsd*-gnu)
4912
      freebsd* | dragonfly*)
4603
	# FreeBSD uses GNU C++
4913
	# FreeBSD uses GNU C++
4604
	;;
4914
	;;
4605
      hpux9* | hpux10* | hpux11*)
4915
      hpux9* | hpux10* | hpux11*)
4606
	case $cc_basename in
4916
	case $cc_basename in
4607
	  CC)
4917
	  CC*)
4608
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4918
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4609
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4919
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4610
	    if test "$host_cpu" != ia64; then
4920
	    if test "$host_cpu" != ia64; then
4611
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4921
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4612
	    fi
4922
	    fi
4613
	    ;;
4923
	    ;;
4614
	  aCC)
4924
	  aCC*)
4615
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4925
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4616
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4926
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4617
	    case "$host_cpu" in
4927
	    case $host_cpu in
4618
	    hppa*64*|ia64*)
4928
	    hppa*64*|ia64*)
4619
	      # +Z the default
4929
	      # +Z the default
4620
	      ;;
4930
	      ;;
Lines 4627-4635 Link Here
4627
	    ;;
4937
	    ;;
4628
	esac
4938
	esac
4629
	;;
4939
	;;
4940
      interix*)
4941
	# This is c89, which is MS Visual C++ (no shared libs)
4942
	# Anyone wants to do a port?
4943
	;;
4630
      irix5* | irix6* | nonstopux*)
4944
      irix5* | irix6* | nonstopux*)
4631
	case $cc_basename in
4945
	case $cc_basename in
4632
	  CC)
4946
	  CC*)
4633
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4947
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4634
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4948
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4635
	    # CC pic flag -KPIC is the default.
4949
	    # CC pic flag -KPIC is the default.
Lines 4638-4657 Link Here
4638
	    ;;
4952
	    ;;
4639
	esac
4953
	esac
4640
	;;
4954
	;;
4641
      linux*)
4955
      linux* | k*bsd*-gnu)
4642
	case $cc_basename in
4956
	case $cc_basename in
4643
	  KCC)
4957
	  KCC*)
4644
	    # KAI C++ Compiler
4958
	    # KAI C++ Compiler
4645
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4959
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4646
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4960
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4647
	    ;;
4961
	    ;;
4648
	  icpc)
4962
	  icpc* | ecpc*)
4649
	    # Intel C++
4963
	    # Intel C++
4650
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4964
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4651
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4965
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4652
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4966
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4653
	    ;; 
4967
	    ;;
4654
	  cxx)
4968
	  pgCC*)
4969
	    # Portland Group C++ compiler.
4970
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4971
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4972
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4973
	    ;;
4974
	  cxx*)
4655
	    # Compaq C++
4975
	    # Compaq C++
4656
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4976
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4657
	    # Linux and Compaq Tru64 Unix objects are PIC.
4977
	    # Linux and Compaq Tru64 Unix objects are PIC.
Lines 4668-4692 Link Here
4668
	;;
4988
	;;
4669
      mvs*)
4989
      mvs*)
4670
	case $cc_basename in
4990
	case $cc_basename in
4671
	  cxx)
4991
	  cxx*)
4672
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4992
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4673
	    ;;
4993
	    ;;
4674
	  *)
4994
	  *)
4675
	    ;;
4995
	    ;;
4676
	esac
4996
	esac
4677
	;;
4997
	;;
4678
      netbsd*)
4998
      netbsd* | netbsdelf*-gnu)
4679
	;;
4999
	;;
4680
      osf3* | osf4* | osf5*)
5000
      osf3* | osf4* | osf5*)
4681
	case $cc_basename in
5001
	case $cc_basename in
4682
	  KCC)
5002
	  KCC*)
4683
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5003
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4684
	    ;;
5004
	    ;;
4685
	  RCC)
5005
	  RCC*)
4686
	    # Rational C++ 2.4.1
5006
	    # Rational C++ 2.4.1
4687
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5007
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4688
	    ;;
5008
	    ;;
4689
	  cxx)
5009
	  cxx*)
4690
	    # Digital/Compaq C++
5010
	    # Digital/Compaq C++
4691
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5011
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4692
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5012
	    # Make sure the PIC flag is empty.  It appears that all Alpha
Lines 4700-4723 Link Here
4700
	;;
5020
	;;
4701
      psos*)
5021
      psos*)
4702
	;;
5022
	;;
4703
      sco*)
4704
	case $cc_basename in
4705
	  CC)
4706
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4707
	    ;;
4708
	  *)
4709
	    ;;
4710
	esac
4711
	;;
4712
      solaris*)
5023
      solaris*)
4713
	case $cc_basename in
5024
	case $cc_basename in
4714
	  CC)
5025
	  CC*)
4715
	    # Sun C++ 4.2, 5.x and Centerline C++
5026
	    # Sun C++ 4.2, 5.x and Centerline C++
4716
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5027
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4717
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5028
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4718
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5029
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4719
	    ;;
5030
	    ;;
4720
	  gcx)
5031
	  gcx*)
4721
	    # Green Hills C++ Compiler
5032
	    # Green Hills C++ Compiler
4722
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5033
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4723
	    ;;
5034
	    ;;
Lines 4727-4738 Link Here
4727
	;;
5038
	;;
4728
      sunos4*)
5039
      sunos4*)
4729
	case $cc_basename in
5040
	case $cc_basename in
4730
	  CC)
5041
	  CC*)
4731
	    # Sun C++ 4.x
5042
	    # Sun C++ 4.x
4732
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5043
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4733
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5044
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4734
	    ;;
5045
	    ;;
4735
	  lcc)
5046
	  lcc*)
4736
	    # Lucid
5047
	    # Lucid
4737
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5048
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4738
	    ;;
5049
	    ;;
Lines 4742-4748 Link Here
4742
	;;
5053
	;;
4743
      tandem*)
5054
      tandem*)
4744
	case $cc_basename in
5055
	case $cc_basename in
4745
	  NCC)
5056
	  NCC*)
4746
	    # NonStop-UX NCC 3.20
5057
	    # NonStop-UX NCC 3.20
4747
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5058
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4748
	    ;;
5059
	    ;;
Lines 4750-4756 Link Here
4750
	    ;;
5061
	    ;;
4751
	esac
5062
	esac
4752
	;;
5063
	;;
4753
      unixware*)
5064
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5065
	case $cc_basename in
5066
	  CC*)
5067
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5068
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5069
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5070
	    ;;
5071
	esac
4754
	;;
5072
	;;
4755
      vxworks*)
5073
      vxworks*)
4756
	;;
5074
	;;
Lines 4797-4802 Link Here
4797
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5115
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4798
      ;;
5116
      ;;
4799
5117
5118
    interix3*)
5119
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5120
      # Instead, we relocate shared libraries at runtime.
5121
      ;;
5122
4800
    msdosdjgpp*)
5123
    msdosdjgpp*)
4801
      # Just because we use GCC doesn't mean we suddenly get shared libraries
5124
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4802
      # on systems that don't support them.
5125
      # on systems that don't support them.
Lines 4813-4819 Link Here
4813
    hpux*)
5136
    hpux*)
4814
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5137
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4815
      # not for PA HP-UX.
5138
      # not for PA HP-UX.
4816
      case "$host_cpu" in
5139
      case $host_cpu in
4817
      hppa*64*|ia64*)
5140
      hppa*64*|ia64*)
4818
	# +Z the default
5141
	# +Z the default
4819
	;;
5142
	;;
Lines 4839-4844 Link Here
4839
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5162
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4840
      fi
5163
      fi
4841
      ;;
5164
      ;;
5165
      darwin*)
5166
        # PIC is the default on this platform
5167
        # Common symbols not allowed in MH_DYLIB files
5168
       case $cc_basename in
5169
         xlc*)
5170
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5171
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5172
         ;;
5173
       esac
5174
       ;;
4842
5175
4843
    mingw* | pw32* | os2*)
5176
    mingw* | pw32* | os2*)
4844
      # This hack is so that the source file can tell whether it is being
5177
      # This hack is so that the source file can tell whether it is being
Lines 4850-4856 Link Here
4850
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5183
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4851
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5184
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4852
      # not for PA HP-UX.
5185
      # not for PA HP-UX.
4853
      case "$host_cpu" in
5186
      case $host_cpu in
4854
      hppa*64*|ia64*)
5187
      hppa*64*|ia64*)
4855
	# +Z the default
5188
	# +Z the default
4856
	;;
5189
	;;
Lines 4873-4885 Link Here
4873
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5206
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4874
      ;;
5207
      ;;
4875
5208
4876
    linux*)
5209
    linux* | k*bsd*-gnu)
4877
      case $CC in
5210
      case $cc_basename in
4878
      icc* | ecc*)
5211
      icc* | ecc*)
4879
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5212
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4880
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5213
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4881
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5214
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4882
        ;;
5215
        ;;
5216
      pgcc* | pgf77* | pgf90* | pgf95*)
5217
        # Portland Group compilers (*not* the Pentium gcc compiler,
5218
	# which looks to be a dead project)
5219
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5220
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5221
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5222
        ;;
4883
      ccc*)
5223
      ccc*)
4884
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5224
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4885
        # All Alpha code is PIC.
5225
        # All Alpha code is PIC.
Lines 4894-4908 Link Here
4894
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5234
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4895
      ;;
5235
      ;;
4896
5236
4897
    sco3.2v5*)
4898
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4899
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4900
      ;;
4901
4902
    solaris*)
5237
    solaris*)
4903
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4904
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5238
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4905
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5239
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5240
      case $cc_basename in
5241
      f77* | f90* | f95*)
5242
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5243
      *)
5244
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5245
      esac
4906
      ;;
5246
      ;;
4907
5247
4908
    sunos4*)
5248
    sunos4*)
Lines 4911-4917 Link Here
4911
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5251
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4912
      ;;
5252
      ;;
4913
5253
4914
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5254
    sysv4 | sysv4.2uw2* | sysv4.3*)
4915
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5255
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4916
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5256
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4917
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5257
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Lines 4924-4929 Link Here
4924
      fi
5264
      fi
4925
      ;;
5265
      ;;
4926
5266
5267
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5268
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5269
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5270
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5271
      ;;
5272
5273
    unicos*)
5274
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5275
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5276
      ;;
5277
4927
    uts4*)
5278
    uts4*)
4928
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5279
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4929
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5280
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Lines 4951-4957 Link Here
4951
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5302
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4952
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5303
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4953
fi
5304
fi
4954
case "$host_os" in
5305
case $host_os in
4955
  # For platforms which do not support PIC, -DPIC is meaningless:
5306
  # For platforms which do not support PIC, -DPIC is meaningless:
4956
  *djgpp*)
5307
  *djgpp*)
4957
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5308
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Lines 4960-4965 Link Here
4960
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5311
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
4961
    ;;
5312
    ;;
4962
esac
5313
esac
5314
5315
#
5316
# Check to make sure the static flag actually works.
5317
#
5318
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5319
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5320
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5321
  $lt_tmp_static_flag,
5322
  [],
5323
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
4963
])
5324
])
4964
5325
4965
5326
Lines 4984-4990 Link Here
4984
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5345
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4985
  ;;
5346
  ;;
4986
  cygwin* | mingw*)
5347
  cygwin* | mingw*)
4987
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5348
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5349
  ;;
5350
  linux* | k*bsd*-gnu)
5351
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
4988
  ;;
5352
  ;;
4989
  *)
5353
  *)
4990
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5354
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Lines 5010-5016 Link Here
5010
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5374
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5011
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5375
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5012
  _LT_AC_TAGVAR(module_cmds, $1)=
5376
  _LT_AC_TAGVAR(module_cmds, $1)=
5013
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
5377
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5014
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5378
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5015
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5379
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5016
  # include_expsyms should be a list of space-separated symbols to be *always*
5380
  # include_expsyms should be a list of space-separated symbols to be *always*
Lines 5027-5033 Link Here
5027
  # rely on this symbol name, it's probably fine to never include it in
5391
  # rely on this symbol name, it's probably fine to never include it in
5028
  # preloaded symbol tables.
5392
  # preloaded symbol tables.
5029
  extract_expsyms_cmds=
5393
  extract_expsyms_cmds=
5030
5394
  # Just being paranoid about ensuring that cc_basename is set.
5395
  _LT_CC_BASENAME([$compiler])
5031
  case $host_os in
5396
  case $host_os in
5032
  cygwin* | mingw* | pw32*)
5397
  cygwin* | mingw* | pw32*)
5033
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5398
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
Lines 5037-5042 Link Here
5037
      with_gnu_ld=no
5402
      with_gnu_ld=no
5038
    fi
5403
    fi
5039
    ;;
5404
    ;;
5405
  interix*)
5406
    # we just hope/assume this is gcc and not c89 (= MSVC++)
5407
    with_gnu_ld=yes
5408
    ;;
5040
  openbsd*)
5409
  openbsd*)
5041
    with_gnu_ld=no
5410
    with_gnu_ld=no
5042
    ;;
5411
    ;;
Lines 5047-5052 Link Here
5047
    # If archive_cmds runs LD, not CC, wlarc should be empty
5416
    # If archive_cmds runs LD, not CC, wlarc should be empty
5048
    wlarc='${wl}'
5417
    wlarc='${wl}'
5049
5418
5419
    # Set some defaults for GNU ld with shared library support. These
5420
    # are reset later if shared libraries are not supported. Putting them
5421
    # here allows them to be overridden if necessary.
5422
    runpath_var=LD_RUN_PATH
5423
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5424
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5425
    # ancient GNU ld didn't support --whole-archive et. al.
5426
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5427
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5428
      else
5429
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5430
    fi
5431
    supports_anon_versioning=no
5432
    case `$LD -v 2>/dev/null` in
5433
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5434
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5435
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5436
      *\ 2.11.*) ;; # other 2.11 versions
5437
      *) supports_anon_versioning=yes ;;
5438
    esac
5439
5050
    # See if GNU ld supports shared libraries.
5440
    # See if GNU ld supports shared libraries.
5051
    case $host_os in
5441
    case $host_os in
5052
    aix3* | aix4* | aix5*)
5442
    aix3* | aix4* | aix5*)
Lines 5084-5090 Link Here
5084
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5474
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5085
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5475
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5086
	# support --undefined.  This deserves some investigation.  FIXME
5476
	# support --undefined.  This deserves some investigation.  FIXME
5087
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
5477
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5088
      else
5478
      else
5089
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5479
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5090
      fi
5480
      fi
Lines 5094-5106 Link Here
5094
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5484
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5095
      # as there is no search path for DLLs.
5485
      # as there is no search path for DLLs.
5096
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5486
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5097
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
5487
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5098
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5488
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5099
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5489
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5100
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5490
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5101
5491
5102
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5492
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5103
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5493
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5104
	# If the export-symbols file already is a .def file (1st line
5494
	# If the export-symbols file already is a .def file (1st line
5105
	# is EXPORTS), use it as is; otherwise, prepend...
5495
	# is EXPORTS), use it as is; otherwise, prepend...
5106
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5496
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Lines 5109-5131 Link Here
5109
	  echo EXPORTS > $output_objdir/$soname.def;
5499
	  echo EXPORTS > $output_objdir/$soname.def;
5110
	  cat $export_symbols >> $output_objdir/$soname.def;
5500
	  cat $export_symbols >> $output_objdir/$soname.def;
5111
	fi~
5501
	fi~
5112
	$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5502
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5503
      else
5504
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5505
      fi
5506
      ;;
5507
5508
    interix3*)
5509
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5510
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5511
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5512
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5513
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5514
      # Instead, shared libraries are loaded at an image base (0x10000000 by
5515
      # default) and relocated if they conflict, which is a slow very memory
5516
      # consuming and fragmenting process.  To avoid this, we pick a random,
5517
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5518
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5519
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5520
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5521
      ;;
5522
5523
    linux* | k*bsd*-gnu)
5524
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5525
	tmp_addflag=
5526
	case $cc_basename,$host_cpu in
5527
	pgcc*)				# Portland Group C compiler
5528
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5529
	  tmp_addflag=' $pic_flag'
5530
	  ;;
5531
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5532
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5533
	  tmp_addflag=' $pic_flag -Mnomain' ;;
5534
	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5535
	  tmp_addflag=' -i_dynamic' ;;
5536
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5537
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5538
	ifc* | ifort*)			# Intel Fortran compiler
5539
	  tmp_addflag=' -nofor_main' ;;
5540
	esac
5541
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5542
5543
	if test $supports_anon_versioning = yes; then
5544
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5545
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5546
  $echo "local: *; };" >> $output_objdir/$libname.ver~
5547
	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5548
	fi
5549
	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
5113
      else
5550
      else
5114
	ld_shlibs=no
5551
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5115
      fi
5552
      fi
5116
      ;;
5553
      ;;
5117
5554
5118
    netbsd*)
5555
    netbsd* | netbsdelf*-gnu)
5119
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5556
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5120
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5557
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5121
	wlarc=
5558
	wlarc=
5122
      else
5559
      else
5123
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
5560
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5124
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5561
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5125
      fi
5562
      fi
5126
      ;;
5563
      ;;
5127
5564
5128
    solaris* | sysv5*)
5565
    solaris*)
5129
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5566
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5130
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5567
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5131
	cat <<EOF 1>&2
5568
	cat <<EOF 1>&2
Lines 5139-5151 Link Here
5139
5576
5140
EOF
5577
EOF
5141
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5578
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5142
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
5579
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5143
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5580
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5144
      else
5581
      else
5145
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5582
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5146
      fi
5583
      fi
5147
      ;;
5584
      ;;
5148
5585
5586
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5587
      case `$LD -v 2>&1` in
5588
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
5589
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5590
	cat <<_LT_EOF 1>&2
5591
5592
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5593
*** reliably create shared libraries on SCO systems.  Therefore, libtool
5594
*** is disabling shared libraries support.  We urge you to upgrade GNU
5595
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5596
*** your PATH or compiler configuration so that the native linker is
5597
*** used, and then restart.
5598
5599
_LT_EOF
5600
	;;
5601
	*)
5602
	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5603
	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5604
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5605
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5606
	  else
5607
	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5608
	  fi
5609
	;;
5610
      esac
5611
      ;;
5612
5149
    sunos4*)
5613
    sunos4*)
5150
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5614
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5151
      wlarc=
5615
      wlarc=
Lines 5155-5178 Link Here
5155
5619
5156
    *)
5620
    *)
5157
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5621
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5158
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
5622
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5159
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5623
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5160
      else
5624
      else
5161
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5625
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5162
      fi
5626
      fi
5163
      ;;
5627
      ;;
5164
    esac
5628
    esac
5165
5629
5166
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5630
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5167
      runpath_var=LD_RUN_PATH
5631
      runpath_var=
5168
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5632
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5169
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5633
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5170
      # ancient GNU ld didn't support --whole-archive et. al.
5634
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5171
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5172
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5173
      else
5174
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5175
      fi
5176
    fi
5635
    fi
5177
  else
5636
  else
5178
    # PORTME fill in a description of your system's linker (not GNU ld)
5637
    # PORTME fill in a description of your system's linker (not GNU ld)
Lines 5184-5190 Link Here
5184
      # Note: this linker hardcodes the directories in LIBPATH if there
5643
      # Note: this linker hardcodes the directories in LIBPATH if there
5185
      # are no directories specified by -L.
5644
      # are no directories specified by -L.
5186
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5645
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5187
      if test "$GCC" = yes && test -z "$link_static_flag"; then
5646
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5188
	# Neither direct hardcoding nor static linking is supported with a
5647
	# Neither direct hardcoding nor static linking is supported with a
5189
	# broken collect2.
5648
	# broken collect2.
5190
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5649
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
Lines 5206-5214 Link Here
5206
	else
5665
	else
5207
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5666
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5208
	fi
5667
	fi
5668
	aix_use_runtimelinking=no
5669
5670
	# Test if we are trying to use run time linking or normal
5671
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5672
	# need to do runtime linking.
5673
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5674
	  for ld_flag in $LDFLAGS; do
5675
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5676
  	    aix_use_runtimelinking=yes
5677
  	    break
5678
  	  fi
5679
	  done
5680
	  ;;
5681
	esac
5209
5682
5210
	# KDE requires run time linking.  Make it the default.
5211
	aix_use_runtimelinking=yes
5212
	exp_sym_flag='-bexport'
5683
	exp_sym_flag='-bexport'
5213
	no_entry_flag='-bnoentry'
5684
	no_entry_flag='-bnoentry'
5214
      fi
5685
      fi
Lines 5225-5231 Link Here
5225
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5696
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5226
5697
5227
      if test "$GCC" = yes; then
5698
      if test "$GCC" = yes; then
5228
	case $host_os in aix4.[012]|aix4.[012].*)
5699
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5229
	# We only want to do this on AIX 4.2 and lower, the check
5700
	# We only want to do this on AIX 4.2 and lower, the check
5230
	# below for broken collect2 doesn't work under 4.3+
5701
	# below for broken collect2 doesn't work under 4.3+
5231
	  collect2name=`${CC} -print-prog-name=collect2`
5702
	  collect2name=`${CC} -print-prog-name=collect2`
Lines 5244-5251 Link Here
5244
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5715
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5245
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5716
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5246
	  fi
5717
	  fi
5718
	  ;;
5247
	esac
5719
	esac
5248
	shared_flag='-shared'
5720
	shared_flag='-shared'
5721
	if test "$aix_use_runtimelinking" = yes; then
5722
	  shared_flag="$shared_flag "'${wl}-G'
5723
	fi
5249
      else
5724
      else
5250
	# not using gcc
5725
	# not using gcc
5251
	if test "$host_cpu" = ia64; then
5726
	if test "$host_cpu" = ia64; then
Lines 5253-5282 Link Here
5253
  	# chokes on -Wl,-G. The following line is correct:
5728
  	# chokes on -Wl,-G. The following line is correct:
5254
	  shared_flag='-G'
5729
	  shared_flag='-G'
5255
	else
5730
	else
5256
  	if test "$aix_use_runtimelinking" = yes; then
5731
	  if test "$aix_use_runtimelinking" = yes; then
5257
	    shared_flag='-qmkshrobj ${wl}-G'
5732
	    shared_flag='${wl}-G'
5258
	  else
5733
	  else
5259
	    shared_flag='-qmkshrobj'
5734
	    shared_flag='${wl}-bM:SRE'
5260
  	fi
5735
	  fi
5261
	fi
5736
	fi
5262
      fi
5737
      fi
5263
5738
5264
      # Let the compiler handle the export list.
5739
      # It seems that -bexpall does not export symbols beginning with
5265
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5740
      # underscore (_), so it is better to generate a list of symbols to export.
5741
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5266
      if test "$aix_use_runtimelinking" = yes; then
5742
      if test "$aix_use_runtimelinking" = yes; then
5267
	# Warning - without using the other runtime loading flags (-brtl),
5743
	# Warning - without using the other runtime loading flags (-brtl),
5268
	# -berok will link without error, but may produce a broken library.
5744
	# -berok will link without error, but may produce a broken library.
5269
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5745
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5270
       # Determine the default libpath from the value encoded in an empty executable.
5746
       # Determine the default libpath from the value encoded in an empty executable.
5271
	_LT_AC_SYS_LIBPATH_AIX
5747
       _LT_AC_SYS_LIBPATH_AIX
5272
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5748
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5273
	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
5749
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5274
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5275
       else
5750
       else
5276
	if test "$host_cpu" = ia64; then
5751
	if test "$host_cpu" = ia64; then
5277
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5752
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5278
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5753
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5279
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5754
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5280
	else
5755
	else
5281
	 # Determine the default libpath from the value encoded in an empty executable.
5756
	 # Determine the default libpath from the value encoded in an empty executable.
5282
	 _LT_AC_SYS_LIBPATH_AIX
5757
	 _LT_AC_SYS_LIBPATH_AIX
Lines 5285-5297 Link Here
5285
	  # -berok will link without error, but may produce a broken library.
5760
	  # -berok will link without error, but may produce a broken library.
5286
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5761
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5287
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5762
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5288
	  # -bexpall does not export symbols beginning with underscore (_)
5289
	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5290
	  # Exported symbols can be pulled into shared objects from archives
5763
	  # Exported symbols can be pulled into shared objects from archives
5291
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5764
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5292
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5765
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5293
	  # This is similar to how AIX traditionally builds it's shared libraries.
5766
	  # This is similar to how AIX traditionally builds its shared libraries.
5294
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5767
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5295
	fi
5768
	fi
5296
      fi
5769
      fi
5297
      ;;
5770
      ;;
Lines 5304-5310 Link Here
5304
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5777
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5305
      ;;
5778
      ;;
5306
5779
5307
    bsdi4*)
5780
    bsdi[[45]]*)
5308
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5781
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5309
      ;;
5782
      ;;
5310
5783
Lines 5314-5382 Link Here
5314
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5787
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5315
      # no search path for DLLs.
5788
      # no search path for DLLs.
5316
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5789
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5317
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
5790
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5318
      # Tell ltmain to make .lib files, not .a files.
5791
      # Tell ltmain to make .lib files, not .a files.
5319
      libext=lib
5792
      libext=lib
5320
      # Tell ltmain to make .dll files, not .so files.
5793
      # Tell ltmain to make .dll files, not .so files.
5321
      shrext=".dll"
5794
      shrext_cmds=".dll"
5322
      # FIXME: Setting linknames here is a bad hack.
5795
      # FIXME: Setting linknames here is a bad hack.
5323
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5796
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5324
      # The linker will automatically build a .lib file if we build a DLL.
5797
      # The linker will automatically build a .lib file if we build a DLL.
5325
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5798
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5326
      # FIXME: Should let the user specify the lib program.
5799
      # FIXME: Should let the user specify the lib program.
5327
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5800
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5328
      fix_srcfile_path='`cygpath -w "$srcfile"`'
5801
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5329
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5802
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5330
      ;;
5803
      ;;
5331
5804
5332
    darwin* | rhapsody*)
5805
    darwin* | rhapsody*)
5333
    if test "$GXX" = yes ; then
5806
      case $host_os in
5334
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5807
        rhapsody* | darwin1.[[012]])
5335
      case "$host_os" in
5808
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5336
      rhapsody* | darwin1.[[012]])
5809
         ;;
5337
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
5810
       *) # Darwin 1.3 on
5338
	;;
5811
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5339
      *) # Darwin 1.3 on
5812
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5340
	if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5813
         else
5341
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
5814
           case ${MACOSX_DEPLOYMENT_TARGET} in
5342
	else
5815
             10.[[012]])
5343
	  case ${MACOSX_DEPLOYMENT_TARGET} in
5816
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5344
	    10.[012])
5817
               ;;
5345
	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
5818
             10.*)
5346
	      ;;
5819
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5347
	    10.*)
5820
               ;;
5348
	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
5821
           esac
5349
	      ;;
5822
         fi
5350
	  esac
5823
         ;;
5351
	fi
5352
	;;
5353
      esac
5824
      esac
5354
    	lt_int_apple_cc_single_mod=no
5825
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5355
    	output_verbose_link_cmd='echo'
5356
    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5357
    	  lt_int_apple_cc_single_mod=yes
5358
    	fi
5359
    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5360
    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
5361
    	else
5362
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
5363
      fi
5364
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
5365
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5366
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5367
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5368
        else
5369
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5370
        fi
5371
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5372
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5826
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5373
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5827
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5374
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5828
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5375
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5829
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5376
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5830
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5377
    else  
5831
    if test "$GCC" = yes ; then
5378
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5832
    	output_verbose_link_cmd='echo'
5379
    fi  
5833
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5834
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5835
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5836
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5837
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5838
    else
5839
      case $cc_basename in
5840
        xlc*)
5841
         output_verbose_link_cmd='echo'
5842
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5843
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5844
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5845
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5846
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5847
          ;;
5848
       *)
5849
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5850
          ;;
5851
      esac
5852
    fi
5380
      ;;
5853
      ;;
5381
5854
5382
    dgux*)
5855
    dgux*)
Lines 5409-5416 Link Here
5409
      ;;
5882
      ;;
5410
5883
5411
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5884
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5412
    freebsd* | kfreebsd*-gnu)
5885
    freebsd* | dragonfly*)
5413
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
5886
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5414
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5887
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5415
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5888
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5416
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5889
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Lines 5418-5424 Link Here
5418
5891
5419
    hpux9*)
5892
    hpux9*)
5420
      if test "$GCC" = yes; then
5893
      if test "$GCC" = yes; then
5421
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5894
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5422
      else
5895
      else
5423
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5896
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5424
      fi
5897
      fi
Lines 5432-5478 Link Here
5432
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5905
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5433
      ;;
5906
      ;;
5434
5907
5435
    hpux10* | hpux11*)
5908
    hpux10*)
5436
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5909
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5437
	case "$host_cpu" in
5910
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5438
	hppa*64*|ia64*)
5911
      else
5439
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
5912
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5913
      fi
5914
      if test "$with_gnu_ld" = no; then
5915
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5916
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5917
5918
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5919
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5920
5921
	# hardcode_minus_L: Not really in the search PATH,
5922
	# but as the default location of the library.
5923
	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5924
      fi
5925
      ;;
5926
5927
    hpux11*)
5928
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5929
	case $host_cpu in
5930
	hppa*64*)
5931
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5932
	  ;;
5933
	ia64*)
5934
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5440
	  ;;
5935
	  ;;
5441
	*)
5936
	*)
5442
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
5937
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5443
	  ;;
5938
	  ;;
5444
	esac
5939
	esac
5445
      else
5940
      else
5446
	case "$host_cpu" in
5941
	case $host_cpu in
5447
	hppa*64*|ia64*)
5942
	hppa*64*)
5448
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5943
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5944
	  ;;
5945
	ia64*)
5946
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5449
	  ;;
5947
	  ;;
5450
	*)
5948
	*)
5451
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5949
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5452
	  ;;
5950
	  ;;
5453
	esac
5951
	esac
5454
      fi
5952
      fi
5455
      if test "$with_gnu_ld" = no; then
5953
      if test "$with_gnu_ld" = no; then
5456
	case "$host_cpu" in
5954
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5457
	hppa*64*)
5955
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5458
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5956
5957
	case $host_cpu in
5958
	hppa*64*|ia64*)
5459
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5959
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5460
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5461
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5960
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5462
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5961
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5463
	  ;;
5962
	  ;;
5464
	ia64*)
5465
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5466
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5467
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5468
5469
	  # hardcode_minus_L: Not really in the search PATH,
5470
	  # but as the default location of the library.
5471
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5472
	  ;;
5473
	*)
5963
	*)
5474
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5475
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5476
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5964
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5477
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5965
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5478
5966
Lines 5486-5492 Link Here
5486
5974
5487
    irix5* | irix6* | nonstopux*)
5975
    irix5* | irix6* | nonstopux*)
5488
      if test "$GCC" = yes; then
5976
      if test "$GCC" = yes; then
5489
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5977
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5490
      else
5978
      else
5491
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5979
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5492
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5980
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
Lines 5496-5502 Link Here
5496
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5984
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5497
      ;;
5985
      ;;
5498
5986
5499
    netbsd*)
5987
    netbsd* | netbsdelf*-gnu)
5500
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5988
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5501
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5989
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5502
      else
5990
      else
Lines 5519-5525 Link Here
5519
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6007
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5520
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6008
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5521
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6009
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5522
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
6010
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6011
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5523
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6012
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5524
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6013
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5525
      else
6014
      else
Lines 5529-5535 Link Here
5529
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6018
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5530
	   ;;
6019
	   ;;
5531
	 *)
6020
	 *)
5532
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
6021
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5533
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6022
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5534
	   ;;
6023
	   ;;
5535
       esac
6024
       esac
Lines 5540-5553 Link Here
5540
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6029
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5541
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6030
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5542
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6031
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5543
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
6032
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5544
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6033
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5545
      ;;
6034
      ;;
5546
6035
5547
    osf3*)
6036
    osf3*)
5548
      if test "$GCC" = yes; then
6037
      if test "$GCC" = yes; then
5549
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6038
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5550
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6039
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5551
      else
6040
      else
5552
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6041
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5553
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6042
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
Lines 5559-5571 Link Here
5559
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6048
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5560
      if test "$GCC" = yes; then
6049
      if test "$GCC" = yes; then
5561
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6050
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5562
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6051
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5563
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6052
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5564
      else
6053
      else
5565
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6054
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5566
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6055
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5567
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6056
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5568
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6057
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
5569
6058
5570
	# Both c and cxx compiler support -rpath directly
6059
	# Both c and cxx compiler support -rpath directly
5571
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6060
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Lines 5573-5593 Link Here
5573
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6062
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5574
      ;;
6063
      ;;
5575
6064
5576
    sco3.2v5*)
5577
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5578
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5579
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5580
      runpath_var=LD_RUN_PATH
5581
      hardcode_runpath_var=yes
5582
      ;;
5583
5584
    solaris*)
6065
    solaris*)
5585
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6066
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5586
      if test "$GCC" = yes; then
6067
      if test "$GCC" = yes; then
5587
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
6068
	wlarc='${wl}'
6069
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5588
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6070
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5589
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
6071
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5590
      else
6072
      else
6073
	wlarc=''
5591
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5592
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6075
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5593
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6076
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
Lines 5596-5603 Link Here
5596
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6079
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5597
      case $host_os in
6080
      case $host_os in
5598
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6081
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5599
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6082
      *)
5600
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6083
 	# The compiler driver will combine linker options so we
6084
 	# cannot just pass the convience library names through
6085
 	# without $wl, iff we do not link with $LD.
6086
 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6087
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6088
 	case $wlarc in
6089
 	'')
6090
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6091
 	*)
6092
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6093
 	esac ;;
5601
      esac
6094
      esac
5602
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6095
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5603
      ;;
6096
      ;;
Lines 5606-5612 Link Here
5606
      if test "x$host_vendor" = xsequent; then
6099
      if test "x$host_vendor" = xsequent; then
5607
	# Use $CC to link under sequent, because it throws in some extra .o
6100
	# Use $CC to link under sequent, because it throws in some extra .o
5608
	# files that make .init and .fini sections work.
6101
	# files that make .init and .fini sections work.
5609
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
6102
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5610
      else
6103
      else
5611
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6104
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5612
      fi
6105
      fi
Lines 5654-5689 Link Here
5654
      fi
6147
      fi
5655
      ;;
6148
      ;;
5656
6149
5657
    sysv4.2uw2*)
6150
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
5658
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6151
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5659
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6152
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5660
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5661
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6153
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5662
      hardcode_runpath_var=yes
6154
      runpath_var='LD_RUN_PATH'
5663
      runpath_var=LD_RUN_PATH
5664
      ;;
5665
6155
5666
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
5667
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5668
      if test "$GCC" = yes; then
6156
      if test "$GCC" = yes; then
5669
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
6157
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6158
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5670
      else
6159
      else
5671
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
6160
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6161
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5672
      fi
6162
      fi
5673
      runpath_var='LD_RUN_PATH'
5674
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5675
      ;;
6163
      ;;
5676
6164
5677
    sysv5*)
6165
    sysv5* | sco3.2v5* | sco5v6*)
5678
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6166
      # Note: We can NOT use -z defs as we might desire, because we do not
5679
      # $CC -shared without GNU ld will not create a library from C++
6167
      # link with -lc, and that would cause any symbols used from libc to
5680
      # object files and a static libstdc++, better avoid it by now
6168
      # always be unresolved, which means just about no library would
5681
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6169
      # ever link correctly.  If we're not using GNU ld we use -z text
5682
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6170
      # though, which does catch some bad symbols but isn't as heavy-handed
5683
  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6171
      # as -z defs.
5684
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6172
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6173
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6174
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5685
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6175
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6176
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6177
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6178
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6179
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5686
      runpath_var='LD_RUN_PATH'
6180
      runpath_var='LD_RUN_PATH'
6181
6182
      if test "$GCC" = yes; then
6183
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6184
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6185
      else
6186
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6187
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6188
      fi
5687
      ;;
6189
      ;;
5688
6190
5689
    uts4*)
6191
    uts4*)
Lines 5701-5711 Link Here
5701
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6203
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5702
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6204
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5703
6205
5704
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5705
if test "$GCC" = yes; then
5706
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5707
fi
5708
5709
#
6206
#
5710
# Do we need to explicitly link libc?
6207
# Do we need to explicitly link libc?
5711
#
6208
#
Lines 5726-5738 Link Here
5726
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6223
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5727
      $rm conftest*
6224
      $rm conftest*
5728
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6225
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5729
  
6226
5730
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6227
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5731
        soname=conftest
6228
        soname=conftest
5732
        lib=conftest
6229
        lib=conftest
5733
        libobjs=conftest.$ac_objext
6230
        libobjs=conftest.$ac_objext
5734
        deplibs=
6231
        deplibs=
5735
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6232
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6233
	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5736
        compiler_flags=-v
6234
        compiler_flags=-v
5737
        linker_flags=-v
6235
        linker_flags=-v
5738
        verstring=
6236
        verstring=
Lines 5860-5866 Link Here
5860
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6358
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5861
# along with /bin/sed that truncates output.
6359
# along with /bin/sed that truncates output.
5862
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6360
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5863
  test ! -f $lt_ac_sed && break
6361
  test ! -f $lt_ac_sed && continue
5864
  cat /dev/null > conftest.in
6362
  cat /dev/null > conftest.in
5865
  lt_ac_count=0
6363
  lt_ac_count=0
5866
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6364
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
(-)a/admin/ltmain.sh (-791 / +1273 lines)
Lines 1-7 Link Here
1
# ltmain.sh - Provide generalized library-building support services.
1
# ltmain.sh - Provide generalized library-building support services.
2
# NOTE: Changing this file will not affect anything until you rerun configure.
2
# NOTE: Changing this file will not affect anything until you rerun configure.
3
#
3
#
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5
# Free Software Foundation, Inc.
5
# Free Software Foundation, Inc.
6
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
#
7
#
Lines 24-29 Link Here
24
# configuration script generated by Autoconf, you may include it under
24
# configuration script generated by Autoconf, you may include it under
25
# the same distribution terms that you use for the rest of that program.
25
# the same distribution terms that you use for the rest of that program.
26
26
27
basename="s,^.*/,,g"
28
29
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
30
# is ksh but when the shell is invoked as "sh" and the current value of
31
# the _XPG environment variable is not equal to 1 (one), the special
32
# positional parameter $0, within a function call, is the name of the
33
# function.
34
progpath="$0"
35
36
# The name of this program:
37
progname=`echo "$progpath" | $SED $basename`
38
modename="$progname"
39
40
# Global variables:
41
EXIT_SUCCESS=0
42
EXIT_FAILURE=1
43
44
PROGRAM=ltmain.sh
45
PACKAGE=libtool
46
VERSION="1.5.22 Debian 1.5.22-4"
47
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
48
49
# See if we are running on zsh, and set the options which allow our
50
# commands through without removal of \ escapes.
51
if test -n "${ZSH_VERSION+set}" ; then
52
  setopt NO_GLOB_SUBST
53
fi
54
27
# Check that we have a working $echo.
55
# Check that we have a working $echo.
28
if test "X$1" = X--no-reexec; then
56
if test "X$1" = X--no-reexec; then
29
  # Discard the --no-reexec flag, and continue.
57
  # Discard the --no-reexec flag, and continue.
Lines 36-42 Link Here
36
  :
64
  :
37
else
65
else
38
  # Restart under the correct shell, and then maybe $echo will work.
66
  # Restart under the correct shell, and then maybe $echo will work.
39
  exec $SHELL "$0" --no-reexec ${1+"$@"}
67
  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
40
fi
68
fi
41
69
42
if test "X$1" = X--fallback-echo; then
70
if test "X$1" = X--fallback-echo; then
Lines 45-63 Link Here
45
  cat <<EOF
73
  cat <<EOF
46
$*
74
$*
47
EOF
75
EOF
48
  exit 0
76
  exit $EXIT_SUCCESS
49
fi
77
fi
50
78
51
# The name of this program.
52
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
53
modename="$progname"
54
55
# Constants.
56
PROGRAM=ltmain.sh
57
PACKAGE=libtool
58
VERSION=1.5a
59
TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"
60
61
default_mode=
79
default_mode=
62
help="Try \`$progname --help' for more information."
80
help="Try \`$progname --help' for more information."
63
magic="%%%MAGIC variable%%%"
81
magic="%%%MAGIC variable%%%"
Lines 70-83 Link Here
70
Xsed="${SED}"' -e 1s/^X//'
88
Xsed="${SED}"' -e 1s/^X//'
71
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
89
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
72
# test EBCDIC or ASCII
90
# test EBCDIC or ASCII
73
case `echo A|tr A '\301'` in
91
case `echo X|tr X '\101'` in
74
 A) # EBCDIC based system
92
 A) # ASCII based system
75
  SP2NL="tr '\100' '\n'"
93
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
76
  NL2SP="tr '\r\n' '\100\100'"
94
  SP2NL='tr \040 \012'
95
  NL2SP='tr \015\012 \040\040'
77
  ;;
96
  ;;
78
 *) # Assume ASCII based system
97
 *) # EBCDIC based system
79
  SP2NL="tr '\040' '\012'"
98
  SP2NL='tr \100 \n'
80
  NL2SP="tr '\015\012' '\040\040'"
99
  NL2SP='tr \r\n \100\100'
81
  ;;
100
  ;;
82
esac
101
esac
83
102
Lines 94-105 Link Here
94
fi
113
fi
95
114
96
# Make sure IFS has a sensible default
115
# Make sure IFS has a sensible default
97
: ${IFS=" 	"}
116
lt_nl='
117
'
118
IFS=" 	$lt_nl"
98
119
99
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
120
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
100
  $echo "$modename: not configured to build any kind of library" 1>&2
121
  $echo "$modename: not configured to build any kind of library" 1>&2
101
  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
122
  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
102
  exit 1
123
  exit $EXIT_FAILURE
103
fi
124
fi
104
125
105
# Global variables.
126
# Global variables.
Lines 111-116 Link Here
111
show="$echo"
132
show="$echo"
112
show_help=
133
show_help=
113
execute_dlfiles=
134
execute_dlfiles=
135
duplicate_deps=no
136
preserve_args=
114
lo2o="s/\\.lo\$/.${objext}/"
137
lo2o="s/\\.lo\$/.${objext}/"
115
o2lo="s/\\.${objext}\$/.lo/"
138
o2lo="s/\\.${objext}\$/.lo/"
116
139
Lines 118-127 Link Here
118
# Shell function definitions:
141
# Shell function definitions:
119
# This seems to be the best place for them
142
# This seems to be the best place for them
120
143
144
# func_mktempdir [string]
145
# Make a temporary directory that won't clash with other running
146
# libtool processes, and avoids race conditions if possible.  If
147
# given, STRING is the basename for that directory.
148
func_mktempdir ()
149
{
150
    my_template="${TMPDIR-/tmp}/${1-$progname}"
151
152
    if test "$run" = ":"; then
153
      # Return a directory name, but don't create it in dry-run mode
154
      my_tmpdir="${my_template}-$$"
155
    else
156
157
      # If mktemp works, use that first and foremost
158
      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
159
160
      if test ! -d "$my_tmpdir"; then
161
	# Failing that, at least try and use $RANDOM to avoid a race
162
	my_tmpdir="${my_template}-${RANDOM-0}$$"
163
164
	save_mktempdir_umask=`umask`
165
	umask 0077
166
	$mkdir "$my_tmpdir"
167
	umask $save_mktempdir_umask
168
      fi
169
170
      # If we're not in dry-run mode, bomb out on failure
171
      test -d "$my_tmpdir" || {
172
        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
173
	exit $EXIT_FAILURE
174
      }
175
    fi
176
177
    $echo "X$my_tmpdir" | $Xsed
178
}
179
180
181
# func_win32_libid arg
182
# return the library type of file 'arg'
183
#
121
# Need a lot of goo to handle *both* DLLs and import libs
184
# Need a lot of goo to handle *both* DLLs and import libs
122
# Has to be a shell function in order to 'eat' the argument
185
# Has to be a shell function in order to 'eat' the argument
123
# that is supplied when $file_magic_command is called.
186
# that is supplied when $file_magic_command is called.
124
win32_libid () {
187
func_win32_libid ()
188
{
125
  win32_libid_type="unknown"
189
  win32_libid_type="unknown"
126
  win32_fileres=`file -L $1 2>/dev/null`
190
  win32_fileres=`file -L $1 2>/dev/null`
127
  case $win32_fileres in
191
  case $win32_fileres in
Lines 130-146 Link Here
130
    ;;
194
    ;;
131
  *ar\ archive*) # could be an import, or static
195
  *ar\ archive*) # could be an import, or static
132
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
196
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
133
      grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
197
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
134
      win32_nmres=`eval $NM -f posix -A $1 | \
198
      win32_nmres=`eval $NM -f posix -A $1 | \
135
	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
199
	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
136
      if test "X$win32_nmres" = "Ximport" ; then
200
      case $win32_nmres in
137
        win32_libid_type="x86 archive import"
201
      import*)  win32_libid_type="x86 archive import";;
138
      else
202
      *)        win32_libid_type="x86 archive static";;
139
        win32_libid_type="x86 archive static"
203
      esac
140
      fi
141
    fi
204
    fi
142
    ;;
205
    ;;
143
  *DLL*) 
206
  *DLL*)
144
    win32_libid_type="x86 DLL"
207
    win32_libid_type="x86 DLL"
145
    ;;
208
    ;;
146
  *executable*) # but shell scripts are "executable" too...
209
  *executable*) # but shell scripts are "executable" too...
Lines 154-162 Link Here
154
  $echo $win32_libid_type
217
  $echo $win32_libid_type
155
}
218
}
156
219
220
221
# func_infer_tag arg
222
# Infer tagged configuration to use if any are available and
223
# if one wasn't chosen via the "--tag" command line option.
224
# Only attempt this if the compiler in the base compile
225
# command doesn't match the default compiler.
226
# arg is usually of the form 'gcc ...'
227
func_infer_tag ()
228
{
229
    if test -n "$available_tags" && test -z "$tagname"; then
230
      CC_quoted=
231
      for arg in $CC; do
232
	case $arg in
233
	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
234
	  arg="\"$arg\""
235
	  ;;
236
	esac
237
	CC_quoted="$CC_quoted $arg"
238
      done
239
      case $@ in
240
      # Blanks in the command may have been stripped by the calling shell,
241
      # but not from the CC environment variable when configure was run.
242
      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
243
      # Blanks at the start of $base_compile will cause this to fail
244
      # if we don't check for them as well.
245
      *)
246
	for z in $available_tags; do
247
	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
248
	    # Evaluate the configuration.
249
	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
250
	    CC_quoted=
251
	    for arg in $CC; do
252
	    # Double-quote args containing other shell metacharacters.
253
	    case $arg in
254
	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
255
	      arg="\"$arg\""
256
	      ;;
257
	    esac
258
	    CC_quoted="$CC_quoted $arg"
259
	  done
260
	    case "$@ " in
261
	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
262
	      # The compiler in the base compile command matches
263
	      # the one in the tagged configuration.
264
	      # Assume this is the tagged configuration we want.
265
	      tagname=$z
266
	      break
267
	      ;;
268
	    esac
269
	  fi
270
	done
271
	# If $tagname still isn't set, then no tagged configuration
272
	# was found and let the user know that the "--tag" command
273
	# line option must be used.
274
	if test -z "$tagname"; then
275
	  $echo "$modename: unable to infer tagged configuration"
276
	  $echo "$modename: specify a tag with \`--tag'" 1>&2
277
	  exit $EXIT_FAILURE
278
#        else
279
#          $echo "$modename: using $tagname tagged configuration"
280
	fi
281
	;;
282
      esac
283
    fi
284
}
285
286
287
# func_extract_an_archive dir oldlib
288
func_extract_an_archive ()
289
{
290
    f_ex_an_ar_dir="$1"; shift
291
    f_ex_an_ar_oldlib="$1"
292
293
    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
294
    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
295
    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
296
     :
297
    else
298
      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
299
      exit $EXIT_FAILURE
300
    fi
301
}
302
303
# func_extract_archives gentop oldlib ...
304
func_extract_archives ()
305
{
306
    my_gentop="$1"; shift
307
    my_oldlibs=${1+"$@"}
308
    my_oldobjs=""
309
    my_xlib=""
310
    my_xabs=""
311
    my_xdir=""
312
    my_status=""
313
314
    $show "${rm}r $my_gentop"
315
    $run ${rm}r "$my_gentop"
316
    $show "$mkdir $my_gentop"
317
    $run $mkdir "$my_gentop"
318
    my_status=$?
319
    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
320
      exit $my_status
321
    fi
322
323
    for my_xlib in $my_oldlibs; do
324
      # Extract the objects.
325
      case $my_xlib in
326
	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
327
	*) my_xabs=`pwd`"/$my_xlib" ;;
328
      esac
329
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
330
      my_xdir="$my_gentop/$my_xlib"
331
332
      $show "${rm}r $my_xdir"
333
      $run ${rm}r "$my_xdir"
334
      $show "$mkdir $my_xdir"
335
      $run $mkdir "$my_xdir"
336
      exit_status=$?
337
      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
338
	exit $exit_status
339
      fi
340
      case $host in
341
      *-darwin*)
342
	$show "Extracting $my_xabs"
343
	# Do not bother doing anything if just a dry run
344
	if test -z "$run"; then
345
	  darwin_orig_dir=`pwd`
346
	  cd $my_xdir || exit $?
347
	  darwin_archive=$my_xabs
348
	  darwin_curdir=`pwd`
349
	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
350
	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
351
	  if test -n "$darwin_arches"; then 
352
	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
353
	    darwin_arch=
354
	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
355
	    for darwin_arch in  $darwin_arches ; do
356
	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
357
	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
358
	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
359
	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
360
	      cd "$darwin_curdir"
361
	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
362
	    done # $darwin_arches
363
      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
364
	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
365
	    darwin_file=
366
	    darwin_files=
367
	    for darwin_file in $darwin_filelist; do
368
	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
369
	      lipo -create -output "$darwin_file" $darwin_files
370
	    done # $darwin_filelist
371
	    ${rm}r unfat-$$
372
	    cd "$darwin_orig_dir"
373
	  else
374
	    cd "$darwin_orig_dir"
375
 	    func_extract_an_archive "$my_xdir" "$my_xabs"
376
	  fi # $darwin_arches
377
	fi # $run
378
	;;
379
      *)
380
        func_extract_an_archive "$my_xdir" "$my_xabs"
381
        ;;
382
      esac
383
      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
384
    done
385
    func_extract_archives_result="$my_oldobjs"
386
}
157
# End of Shell function definitions
387
# End of Shell function definitions
158
#####################################
388
#####################################
159
389
390
# Darwin sucks
391
eval std_shrext=\"$shrext_cmds\"
392
393
disable_libs=no
394
160
# Parse our command line options once, thoroughly.
395
# Parse our command line options once, thoroughly.
161
while test "$#" -gt 0
396
while test "$#" -gt 0
162
do
397
do
Lines 176-187 Link Here
176
      ;;
411
      ;;
177
    tag)
412
    tag)
178
      tagname="$arg"
413
      tagname="$arg"
414
      preserve_args="${preserve_args}=$arg"
179
415
180
      # Check whether tagname contains only valid characters
416
      # Check whether tagname contains only valid characters
181
      case $tagname in
417
      case $tagname in
182
      *[!-_A-Za-z0-9,/]*)
418
      *[!-_A-Za-z0-9,/]*)
183
	$echo "$progname: invalid tag name: $tagname" 1>&2
419
	$echo "$progname: invalid tag name: $tagname" 1>&2
184
	exit 1
420
	exit $EXIT_FAILURE
185
	;;
421
	;;
186
      esac
422
      esac
187
423
Lines 191-200 Link Here
191
	# not specially marked.
427
	# not specially marked.
192
	;;
428
	;;
193
      *)
429
      *)
194
	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
430
	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
195
	  taglist="$taglist $tagname"
431
	  taglist="$taglist $tagname"
196
	  # Evaluate the configuration.
432
	  # Evaluate the configuration.
197
	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
433
	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
198
	else
434
	else
199
	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
435
	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
200
	fi
436
	fi
Lines 220-243 Link Here
220
  --version)
456
  --version)
221
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
457
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
222
    $echo
458
    $echo
223
    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
459
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
224
    $echo "This is free software; see the source for copying conditions.  There is NO"
460
    $echo "This is free software; see the source for copying conditions.  There is NO"
225
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
461
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
226
    exit 0
462
    exit $?
227
    ;;
463
    ;;
228
464
229
  --config)
465
  --config)
230
    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
466
    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
231
    # Now print the configurations for the tags.
467
    # Now print the configurations for the tags.
232
    for tagname in $taglist; do
468
    for tagname in $taglist; do
233
      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
469
      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
234
    done
470
    done
235
    exit 0
471
    exit $?
236
    ;;
472
    ;;
237
473
238
  --debug)
474
  --debug)
239
    $echo "$progname: enabling shell trace mode"
475
    $echo "$progname: enabling shell trace mode"
240
    set -x
476
    set -x
477
    preserve_args="$preserve_args $arg"
241
    ;;
478
    ;;
242
479
243
  --dry-run | -n)
480
  --dry-run | -n)
Lines 256-262 Link Here
256
    else
493
    else
257
      $echo "disable static libraries"
494
      $echo "disable static libraries"
258
    fi
495
    fi
259
    exit 0
496
    exit $?
260
    ;;
497
    ;;
261
498
262
  --finish) mode="finish" ;;
499
  --finish) mode="finish" ;;
Lines 268-280 Link Here
268
505
269
  --quiet | --silent)
506
  --quiet | --silent)
270
    show=:
507
    show=:
508
    preserve_args="$preserve_args $arg"
271
    ;;
509
    ;;
272
510
273
  --tag) prevopt="--tag" prev=tag ;;
511
  --tag)
512
    prevopt="--tag"
513
    prev=tag
514
    preserve_args="$preserve_args --tag"
515
    ;;
274
  --tag=*)
516
  --tag=*)
275
    set tag "$optarg" ${1+"$@"}
517
    set tag "$optarg" ${1+"$@"}
276
    shift
518
    shift
277
    prev=tag
519
    prev=tag
520
    preserve_args="$preserve_args --tag"
278
    ;;
521
    ;;
279
522
280
  -dlopen)
523
  -dlopen)
Lines 285-291 Link Here
285
  -*)
528
  -*)
286
    $echo "$modename: unrecognized option \`$arg'" 1>&2
529
    $echo "$modename: unrecognized option \`$arg'" 1>&2
287
    $echo "$help" 1>&2
530
    $echo "$help" 1>&2
288
    exit 1
531
    exit $EXIT_FAILURE
289
    ;;
532
    ;;
290
533
291
  *)
534
  *)
Lines 298-306 Link Here
298
if test -n "$prevopt"; then
541
if test -n "$prevopt"; then
299
  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
542
  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
300
  $echo "$help" 1>&2
543
  $echo "$help" 1>&2
301
  exit 1
544
  exit $EXIT_FAILURE
302
fi
545
fi
303
546
547
case $disable_libs in
548
no) 
549
  ;;
550
shared)
551
  build_libtool_libs=no
552
  build_old_libs=yes
553
  ;;
554
static)
555
  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
556
  ;;
557
esac
558
304
# If this variable is set in any of the actions, the command in it
559
# If this variable is set in any of the actions, the command in it
305
# will be execed at the end.  This prevents here-documents from being
560
# will be execed at the end.  This prevents here-documents from being
306
# left over by shells.
561
# left over by shells.
Lines 311-317 Link Here
311
  # Infer the operation mode.
566
  # Infer the operation mode.
312
  if test -z "$mode"; then
567
  if test -z "$mode"; then
313
    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
568
    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
314
    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
569
    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
315
    case $nonopt in
570
    case $nonopt in
316
    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
571
    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
317
      mode=link
572
      mode=link
Lines 354-360 Link Here
354
  if test -n "$execute_dlfiles" && test "$mode" != execute; then
609
  if test -n "$execute_dlfiles" && test "$mode" != execute; then
355
    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
610
    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
356
    $echo "$help" 1>&2
611
    $echo "$help" 1>&2
357
    exit 1
612
    exit $EXIT_FAILURE
358
  fi
613
  fi
359
614
360
  # Change the help message to a mode-specific one.
615
  # Change the help message to a mode-specific one.
Lines 369-381 Link Here
369
    # Get the compilation command and the source file.
624
    # Get the compilation command and the source file.
370
    base_compile=
625
    base_compile=
371
    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
626
    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
627
    suppress_opt=yes
372
    suppress_output=
628
    suppress_output=
373
    arg_mode=normal
629
    arg_mode=normal
374
    libobj=
630
    libobj=
631
    later=
375
632
376
    for arg
633
    for arg
377
    do
634
    do
378
      case "$arg_mode" in
635
      case $arg_mode in
379
      arg  )
636
      arg  )
380
	# do not "continue".  Instead, add this to base_compile
637
	# do not "continue".  Instead, add this to base_compile
381
	lastarg="$arg"
638
	lastarg="$arg"
Lines 394-417 Link Here
394
	-o)
651
	-o)
395
	  if test -n "$libobj" ; then
652
	  if test -n "$libobj" ; then
396
	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
653
	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
397
	    exit 1
654
	    exit $EXIT_FAILURE
398
	  fi
655
	  fi
399
	  arg_mode=target
656
	  arg_mode=target
400
	  continue
657
	  continue
401
	  ;;
658
	  ;;
402
659
403
	-static)
660
	-static | -prefer-pic | -prefer-non-pic)
404
	  build_old_libs=yes
661
	  later="$later $arg"
405
	  continue
662
	  continue
406
	  ;;
663
	  ;;
407
664
408
	-prefer-pic)
665
	-no-suppress)
409
	  pic_mode=yes
666
	  suppress_opt=no
410
	  continue
411
	  ;;
412
413
	-prefer-non-pic)
414
	  pic_mode=no
415
	  continue
667
	  continue
416
	  ;;
668
	  ;;
417
669
Lines 424-430 Link Here
424
	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
676
	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
425
	  lastarg=
677
	  lastarg=
426
	  save_ifs="$IFS"; IFS=','
678
	  save_ifs="$IFS"; IFS=','
427
	  for arg in $args; do
679
 	  for arg in $args; do
428
	    IFS="$save_ifs"
680
	    IFS="$save_ifs"
429
681
430
	    # Double-quote args containing other shell metacharacters.
682
	    # Double-quote args containing other shell metacharacters.
Lines 462-468 Link Here
462
      case $lastarg in
714
      case $lastarg in
463
      # Double-quote args containing other shell metacharacters.
715
      # Double-quote args containing other shell metacharacters.
464
      # Many Bourne shells cannot handle close brackets correctly
716
      # Many Bourne shells cannot handle close brackets correctly
465
      # in scan sets, so we specify it separately.
717
      # in scan sets, and some SunOS ksh mistreat backslash-escaping
718
      # in scan sets (worked around with variable expansion),
719
      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
720
      # at all, so we specify them separately.
466
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
721
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
467
	lastarg="\"$lastarg\""
722
	lastarg="\"$lastarg\""
468
	;;
723
	;;
Lines 474-484 Link Here
474
    case $arg_mode in
729
    case $arg_mode in
475
    arg)
730
    arg)
476
      $echo "$modename: you must specify an argument for -Xcompile"
731
      $echo "$modename: you must specify an argument for -Xcompile"
477
      exit 1
732
      exit $EXIT_FAILURE
478
      ;;
733
      ;;
479
    target)
734
    target)
480
      $echo "$modename: you must specify a target with \`-o'" 1>&2
735
      $echo "$modename: you must specify a target with \`-o'" 1>&2
481
      exit 1
736
      exit $EXIT_FAILURE
482
      ;;
737
      ;;
483
    *)
738
    *)
484
      # Get the name of the library object.
739
      # Get the name of the library object.
Lines 511-561 Link Here
511
    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
766
    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
512
    *)
767
    *)
513
      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
768
      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
514
      exit 1
769
      exit $EXIT_FAILURE
515
      ;;
770
      ;;
516
    esac
771
    esac
517
772
518
    # Infer tagged configuration to use if any are available and
773
    func_infer_tag $base_compile
519
    # if one wasn't chosen via the "--tag" command line option.
774
520
    # Only attempt this if the compiler in the base compile
775
    for arg in $later; do
521
    # command doesn't match the default compiler.
776
      case $arg in
522
    if test -n "$available_tags" && test -z "$tagname"; then
777
      -static)
523
      case $base_compile in
778
	build_old_libs=yes
524
      # Blanks in the command may have been stripped by the calling shell,
779
	continue
525
      # but not from the CC environment variable when configure was run.
780
	;;
526
      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
781
527
      # Blanks at the start of $base_compile will cause this to fail
782
      -prefer-pic)
528
      # if we don't check for them as well.
783
	pic_mode=yes
529
      *)
784
	continue
530
	for z in $available_tags; do
785
	;;
531
	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
786
532
	    # Evaluate the configuration.
787
      -prefer-non-pic)
533
	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
788
	pic_mode=no
534
	    case "$base_compile " in
789
	continue
535
	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
536
	      # The compiler in the base compile command matches
537
	      # the one in the tagged configuration.
538
	      # Assume this is the tagged configuration we want.
539
	      tagname=$z
540
	      break
541
	      ;;
542
	    esac
543
	  fi
544
	done
545
	# If $tagname still isn't set, then no tagged configuration
546
	# was found and let the user know that the "--tag" command
547
	# line option must be used.
548
	if test -z "$tagname"; then
549
	  $echo "$modename: unable to infer tagged configuration"
550
	  $echo "$modename: specify a tag with \`--tag'" 1>&2
551
	  exit 1
552
#        else
553
#          $echo "$modename: using $tagname tagged configuration"
554
	fi
555
	;;
790
	;;
556
      esac
791
      esac
557
    fi
792
    done
558
793
794
    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
795
    case $qlibobj in
796
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
797
	qlibobj="\"$qlibobj\"" ;;
798
    esac
799
    test "X$libobj" != "X$qlibobj" \
800
	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
801
	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
559
    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
802
    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
560
    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
803
    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
561
    if test "X$xdir" = "X$obj"; then
804
    if test "X$xdir" = "X$obj"; then
Lines 568-574 Link Here
568
    if test -z "$base_compile"; then
811
    if test -z "$base_compile"; then
569
      $echo "$modename: you must specify a compilation command" 1>&2
812
      $echo "$modename: you must specify a compilation command" 1>&2
570
      $echo "$help" 1>&2
813
      $echo "$help" 1>&2
571
      exit 1
814
      exit $EXIT_FAILURE
572
    fi
815
    fi
573
816
574
    # Delete any leftover library objects.
817
    # Delete any leftover library objects.
Lines 579-585 Link Here
579
    fi
822
    fi
580
823
581
    $run $rm $removelist
824
    $run $rm $removelist
582
    trap "$run $rm $removelist; exit 1" 1 2 15
825
    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
583
826
584
    # On Cygwin there's no "real" PIC flag so we must build both object types
827
    # On Cygwin there's no "real" PIC flag so we must build both object types
585
    case $host_os in
828
    case $host_os in
Lines 598-604 Link Here
598
      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
841
      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
599
      lockfile="$output_obj.lock"
842
      lockfile="$output_obj.lock"
600
      removelist="$removelist $output_obj $lockfile"
843
      removelist="$removelist $output_obj $lockfile"
601
      trap "$run $rm $removelist; exit 1" 1 2 15
844
      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
602
    else
845
    else
603
      output_obj=
846
      output_obj=
604
      need_locks=no
847
      need_locks=no
Lines 608-614 Link Here
608
    # Lock this critical section if it is needed
851
    # Lock this critical section if it is needed
609
    # We use this script file to make the link, it avoids creating a new file
852
    # We use this script file to make the link, it avoids creating a new file
610
    if test "$need_locks" = yes; then
853
    if test "$need_locks" = yes; then
611
      until $run ln "$0" "$lockfile" 2>/dev/null; do
854
      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
612
	$show "Waiting for $lockfile to be removed"
855
	$show "Waiting for $lockfile to be removed"
613
	sleep 2
856
	sleep 2
614
      done
857
      done
Lines 626-639 Link Here
626
compiler."
869
compiler."
627
870
628
	$run $rm $removelist
871
	$run $rm $removelist
629
	exit 1
872
	exit $EXIT_FAILURE
630
      fi
873
      fi
631
      $echo $srcfile > "$lockfile"
874
      $echo "$srcfile" > "$lockfile"
632
    fi
875
    fi
633
876
634
    if test -n "$fix_srcfile_path"; then
877
    if test -n "$fix_srcfile_path"; then
635
      eval srcfile=\"$fix_srcfile_path\"
878
      eval srcfile=\"$fix_srcfile_path\"
636
    fi
879
    fi
880
    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
881
    case $qsrcfile in
882
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
883
      qsrcfile="\"$qsrcfile\"" ;;
884
    esac
637
885
638
    $run $rm "$libobj" "${libobj}T"
886
    $run $rm "$libobj" "${libobj}T"
639
887
Lines 655-672 Link Here
655
      fbsd_hideous_sh_bug=$base_compile
903
      fbsd_hideous_sh_bug=$base_compile
656
904
657
      if test "$pic_mode" != no; then
905
      if test "$pic_mode" != no; then
658
	command="$base_compile $srcfile $pic_flag"
906
	command="$base_compile $qsrcfile $pic_flag"
659
      else
907
      else
660
	# Don't build PIC code
908
	# Don't build PIC code
661
	command="$base_compile $srcfile"
909
	command="$base_compile $qsrcfile"
662
      fi
910
      fi
663
911
664
      if test ! -d "${xdir}$objdir"; then
912
      if test ! -d "${xdir}$objdir"; then
665
	$show "$mkdir ${xdir}$objdir"
913
	$show "$mkdir ${xdir}$objdir"
666
	$run $mkdir ${xdir}$objdir
914
	$run $mkdir ${xdir}$objdir
667
	status=$?
915
	exit_status=$?
668
	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
916
	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
669
	  exit $status
917
	  exit $exit_status
670
	fi
918
	fi
671
      fi
919
      fi
672
920
Lines 681-687 Link Here
681
      if $run eval "$command"; then :
929
      if $run eval "$command"; then :
682
      else
930
      else
683
	test -n "$output_obj" && $run $rm $removelist
931
	test -n "$output_obj" && $run $rm $removelist
684
	exit 1
932
	exit $EXIT_FAILURE
685
      fi
933
      fi
686
934
687
      if test "$need_locks" = warn &&
935
      if test "$need_locks" = warn &&
Lines 701-707 Link Here
701
compiler."
949
compiler."
702
950
703
	$run $rm $removelist
951
	$run $rm $removelist
704
	exit 1
952
	exit $EXIT_FAILURE
705
      fi
953
      fi
706
954
707
      # Just move the object if needed, then go on to compile the next one
955
      # Just move the object if needed, then go on to compile the next one
Lines 722-728 Link Here
722
EOF
970
EOF
723
971
724
      # Allow error messages only from the first compilation.
972
      # Allow error messages only from the first compilation.
725
      suppress_output=' >/dev/null 2>&1'
973
      if test "$suppress_opt" = yes; then
974
        suppress_output=' >/dev/null 2>&1'
975
      fi
726
    else
976
    else
727
      # No PIC object so indicate it doesn't exist in the libtool
977
      # No PIC object so indicate it doesn't exist in the libtool
728
      # object file.
978
      # object file.
Lines 736-744 Link Here
736
    if test "$build_old_libs" = yes; then
986
    if test "$build_old_libs" = yes; then
737
      if test "$pic_mode" != yes; then
987
      if test "$pic_mode" != yes; then
738
	# Don't build PIC code
988
	# Don't build PIC code
739
	command="$base_compile $srcfile"
989
	command="$base_compile $qsrcfile"
740
      else
990
      else
741
	command="$base_compile $srcfile $pic_flag"
991
	command="$base_compile $qsrcfile $pic_flag"
742
      fi
992
      fi
743
      if test "$compiler_c_o" = yes; then
993
      if test "$compiler_c_o" = yes; then
744
	command="$command -o $obj"
994
	command="$command -o $obj"
Lines 751-757 Link Here
751
      if $run eval "$command"; then :
1001
      if $run eval "$command"; then :
752
      else
1002
      else
753
	$run $rm $removelist
1003
	$run $rm $removelist
754
	exit 1
1004
	exit $EXIT_FAILURE
755
      fi
1005
      fi
756
1006
757
      if test "$need_locks" = warn &&
1007
      if test "$need_locks" = warn &&
Lines 771-777 Link Here
771
compiler."
1021
compiler."
772
1022
773
	$run $rm $removelist
1023
	$run $rm $removelist
774
	exit 1
1024
	exit $EXIT_FAILURE
775
      fi
1025
      fi
776
1026
777
      # Just move the object if needed
1027
      # Just move the object if needed
Lines 809-815 Link Here
809
      $run $rm "$lockfile"
1059
      $run $rm "$lockfile"
810
    fi
1060
    fi
811
1061
812
    exit 0
1062
    exit $EXIT_SUCCESS
813
    ;;
1063
    ;;
814
1064
815
  # libtool link mode
1065
  # libtool link mode
Lines 835-841 Link Here
835
      ;;
1085
      ;;
836
    esac
1086
    esac
837
    libtool_args="$nonopt"
1087
    libtool_args="$nonopt"
838
    base_compile="$nonopt"
1088
    base_compile="$nonopt $@"
839
    compile_command="$nonopt"
1089
    compile_command="$nonopt"
840
    finalize_command="$nonopt"
1090
    finalize_command="$nonopt"
841
1091
Lines 847-853 Link Here
847
    old_convenience=
1097
    old_convenience=
848
    deplibs=
1098
    deplibs=
849
    old_deplibs=
1099
    old_deplibs=
850
    add_flags=
851
    compiler_flags=
1100
    compiler_flags=
852
    linker_flags=
1101
    linker_flags=
853
    dllsearchpath=
1102
    dllsearchpath=
Lines 868-873 Link Here
868
    no_install=no
1117
    no_install=no
869
    objs=
1118
    objs=
870
    non_pic_objects=
1119
    non_pic_objects=
1120
    notinst_path= # paths that contain not-installed libtool libraries
1121
    precious_files_regex=
871
    prefer_static_libs=no
1122
    prefer_static_libs=no
872
    preload=no
1123
    preload=no
873
    prev=
1124
    prev=
Lines 881-886 Link Here
881
    vinfo=
1132
    vinfo=
882
    vinfo_number=no
1133
    vinfo_number=no
883
1134
1135
    func_infer_tag $base_compile
1136
884
    # We need to know -static, to get the right output filenames.
1137
    # We need to know -static, to get the right output filenames.
885
    for arg
1138
    for arg
886
    do
1139
    do
Lines 893-906 Link Here
893
	  if test -n "$link_static_flag"; then
1146
	  if test -n "$link_static_flag"; then
894
	    dlopen_self=$dlopen_self_static
1147
	    dlopen_self=$dlopen_self_static
895
	  fi
1148
	  fi
1149
	  prefer_static_libs=yes
896
	else
1150
	else
897
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1151
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
898
	    dlopen_self=$dlopen_self_static
1152
	    dlopen_self=$dlopen_self_static
899
	  fi
1153
	  fi
1154
	  prefer_static_libs=built
900
	fi
1155
	fi
901
	build_libtool_libs=no
1156
	build_libtool_libs=no
902
	build_old_libs=yes
1157
	build_old_libs=yes
903
	prefer_static_libs=yes
904
	break
1158
	break
905
	;;
1159
	;;
906
      esac
1160
      esac
Lines 912-918 Link Here
912
    # Go through the arguments, transforming them on the way.
1166
    # Go through the arguments, transforming them on the way.
913
    while test "$#" -gt 0; do
1167
    while test "$#" -gt 0; do
914
      arg="$1"
1168
      arg="$1"
915
      base_compile="$base_compile $arg"
916
      shift
1169
      shift
917
      case $arg in
1170
      case $arg in
918
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1171
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Lines 976-982 Link Here
976
	  export_symbols="$arg"
1229
	  export_symbols="$arg"
977
	  if test ! -f "$arg"; then
1230
	  if test ! -f "$arg"; then
978
	    $echo "$modename: symbol file \`$arg' does not exist"
1231
	    $echo "$modename: symbol file \`$arg' does not exist"
979
	    exit 1
1232
	    exit $EXIT_FAILURE
980
	  fi
1233
	  fi
981
	  prev=
1234
	  prev=
982
	  continue
1235
	  continue
Lines 991-996 Link Here
991
	  prev=
1244
	  prev=
992
	  continue
1245
	  continue
993
	  ;;
1246
	  ;;
1247
	precious_regex)
1248
	  precious_files_regex="$arg"
1249
	  prev=
1250
	  continue
1251
	  ;;
994
	release)
1252
	release)
995
	  release="-$arg"
1253
	  release="-$arg"
996
	  prev=
1254
	  prev=
Lines 1023-1029 Link Here
1023
		   test "$pic_object" = none && \
1281
		   test "$pic_object" = none && \
1024
		   test "$non_pic_object" = none; then
1282
		   test "$non_pic_object" = none; then
1025
		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1283
		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1026
		  exit 1
1284
		  exit $EXIT_FAILURE
1027
		fi
1285
		fi
1028
1286
1029
		# Extract subdirectory from the argument.
1287
		# Extract subdirectory from the argument.
Lines 1071-1082 Link Here
1071
		  if test -z "$pic_object" || test "$pic_object" = none ; then
1329
		  if test -z "$pic_object" || test "$pic_object" = none ; then
1072
		    arg="$non_pic_object"
1330
		    arg="$non_pic_object"
1073
		  fi
1331
		  fi
1332
		else
1333
		  # If the PIC object exists, use it instead.
1334
		  # $xdir was prepended to $pic_object above.
1335
		  non_pic_object="$pic_object"
1336
		  non_pic_objects="$non_pic_objects $non_pic_object"
1074
		fi
1337
		fi
1075
	      else
1338
	      else
1076
		# Only an error if not doing a dry-run.
1339
		# Only an error if not doing a dry-run.
1077
		if test -z "$run"; then
1340
		if test -z "$run"; then
1078
		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1341
		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1079
		  exit 1
1342
		  exit $EXIT_FAILURE
1080
		else
1343
		else
1081
		  # Dry-run case.
1344
		  # Dry-run case.
1082
1345
Lines 1097-1103 Link Here
1097
	    done
1360
	    done
1098
	  else
1361
	  else
1099
	    $echo "$modename: link input file \`$save_arg' does not exist"
1362
	    $echo "$modename: link input file \`$save_arg' does not exist"
1100
	    exit 1
1363
	    exit $EXIT_FAILURE
1101
	  fi
1364
	  fi
1102
	  arg=$save_arg
1365
	  arg=$save_arg
1103
	  prev=
1366
	  prev=
Lines 1109-1115 Link Here
1109
	  [\\/]* | [A-Za-z]:[\\/]*) ;;
1372
	  [\\/]* | [A-Za-z]:[\\/]*) ;;
1110
	  *)
1373
	  *)
1111
	    $echo "$modename: only absolute run-paths are allowed" 1>&2
1374
	    $echo "$modename: only absolute run-paths are allowed" 1>&2
1112
	    exit 1
1375
	    exit $EXIT_FAILURE
1113
	    ;;
1376
	    ;;
1114
	  esac
1377
	  esac
1115
	  if test "$prev" = rpath; then
1378
	  if test "$prev" = rpath; then
Lines 1149-1164 Link Here
1149
	  finalize_command="$finalize_command $qarg"
1412
	  finalize_command="$finalize_command $qarg"
1150
	  continue
1413
	  continue
1151
	  ;;
1414
	  ;;
1152
	framework)
1415
	shrext)
1153
	  case $host in
1416
  	  shrext_cmds="$arg"
1154
	    *-*-darwin*)
1417
	  prev=
1155
	      case "$deplibs " in
1418
	  continue
1156
	        *" $qarg.ltframework "*) ;;
1419
	  ;;
1157
		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
1420
	darwin_framework|darwin_framework_skip)
1158
		   ;;
1421
	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1159
              esac
1422
	  compile_command="$compile_command $arg"
1160
              ;;
1423
	  finalize_command="$finalize_command $arg"
1161
   	  esac
1162
	  prev=
1424
	  prev=
1163
	  continue
1425
	  continue
1164
	  ;;
1426
	  ;;
Lines 1210-1216 Link Here
1210
      -export-symbols | -export-symbols-regex)
1472
      -export-symbols | -export-symbols-regex)
1211
	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1473
	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1212
	  $echo "$modename: more than one -exported-symbols argument is not allowed"
1474
	  $echo "$modename: more than one -exported-symbols argument is not allowed"
1213
	  exit 1
1475
	  exit $EXIT_FAILURE
1214
	fi
1476
	fi
1215
	if test "X$arg" = "X-export-symbols"; then
1477
	if test "X$arg" = "X-export-symbols"; then
1216
	  prev=expsyms
1478
	  prev=expsyms
Lines 1220-1225 Link Here
1220
	continue
1482
	continue
1221
	;;
1483
	;;
1222
1484
1485
      -framework|-arch|-isysroot)
1486
	case " $CC " in
1487
	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
1488
		prev=darwin_framework_skip ;;
1489
	  *) compiler_flags="$compiler_flags $arg"
1490
	     prev=darwin_framework ;;
1491
	esac
1492
	compile_command="$compile_command $arg"
1493
	finalize_command="$finalize_command $arg"
1494
	continue
1495
	;;
1496
1223
      -inst-prefix-dir)
1497
      -inst-prefix-dir)
1224
	prev=inst_prefix
1498
	prev=inst_prefix
1225
	continue
1499
	continue
Lines 1246-1252 Link Here
1246
	  absdir=`cd "$dir" && pwd`
1520
	  absdir=`cd "$dir" && pwd`
1247
	  if test -z "$absdir"; then
1521
	  if test -z "$absdir"; then
1248
	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1522
	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1249
	    exit 1
1523
	    absdir="$dir"
1524
	    notinst_path="$notinst_path $dir"
1250
	  fi
1525
	  fi
1251
	  dir="$absdir"
1526
	  dir="$absdir"
1252
	  ;;
1527
	  ;;
Lines 1260-1269 Link Here
1260
	esac
1535
	esac
1261
	case $host in
1536
	case $host in
1262
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1537
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1538
	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1263
	  case :$dllsearchpath: in
1539
	  case :$dllsearchpath: in
1264
	  *":$dir:"*) ;;
1540
	  *":$dir:"*) ;;
1265
	  *) dllsearchpath="$dllsearchpath:$dir";;
1541
	  *) dllsearchpath="$dllsearchpath:$dir";;
1266
	  esac
1542
	  esac
1543
	  case :$dllsearchpath: in
1544
	  *":$testbindir:"*) ;;
1545
	  *) dllsearchpath="$dllsearchpath:$testbindir";;
1546
	  esac
1267
	  ;;
1547
	  ;;
1268
	esac
1548
	esac
1269
	continue
1549
	continue
Lines 1272-1297 Link Here
1272
      -l*)
1552
      -l*)
1273
	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1553
	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1274
	  case $host in
1554
	  case $host in
1275
	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
1555
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1276
	    # These systems don't actually have a C or math library (as such)
1556
	    # These systems don't actually have a C or math library (as such)
1277
	    continue
1557
	    continue
1278
	    ;;
1558
	    ;;
1279
	  *-*-mingw* | *-*-os2*)
1559
	  *-*-os2*)
1280
	    # These systems don't actually have a C library (as such)
1560
	    # These systems don't actually have a C library (as such)
1281
	    test "X$arg" = "X-lc" && continue
1561
	    test "X$arg" = "X-lc" && continue
1282
	    ;;
1562
	    ;;
1283
	  *-*-openbsd* | *-*-freebsd*)
1563
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1284
	    # Do not include libc due to us having libc/libc_r.
1564
	    # Do not include libc due to us having libc/libc_r.
1285
	    test "X$arg" = "X-lc" && continue
1565
	    test "X$arg" = "X-lc" && continue
1286
	    ;;
1566
	    ;;
1287
	  *-*-rhapsody* | *-*-darwin1.[012])
1567
	  *-*-rhapsody* | *-*-darwin1.[012])
1288
	    # Rhapsody C and math libraries are in the System framework
1568
	    # Rhapsody C and math libraries are in the System framework
1289
	    deplibs="$deplibs System.ltframework"
1569
	    deplibs="$deplibs -framework System"
1290
	    continue
1570
	    continue
1571
	    ;;
1572
	  *-*-sco3.2v5* | *-*-sco5v6*)
1573
	    # Causes problems with __ctype
1574
	    test "X$arg" = "X-lc" && continue
1575
	    ;;
1576
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1577
	    # Compiler inserts libc in the correct place for threads to work
1578
	    test "X$arg" = "X-lc" && continue
1579
	    ;;
1291
	  esac
1580
	  esac
1292
	elif test "X$arg" = "X-lc_r"; then
1581
	elif test "X$arg" = "X-lc_r"; then
1293
	 case $host in
1582
	 case $host in
1294
	 *-*-openbsd*)
1583
	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1295
	   # Do not include libc_r directly, use -pthread flag.
1584
	   # Do not include libc_r directly, use -pthread flag.
1296
	   continue
1585
	   continue
1297
	   ;;
1586
	   ;;
Lines 1301-1318 Link Here
1301
	continue
1590
	continue
1302
	;;
1591
	;;
1303
1592
1593
      # Tru64 UNIX uses -model [arg] to determine the layout of C++
1594
      # classes, name mangling, and exception handling.
1595
      -model)
1596
	compile_command="$compile_command $arg"
1597
	compiler_flags="$compiler_flags $arg"
1598
	finalize_command="$finalize_command $arg"
1599
	prev=xcompiler
1600
	continue
1601
	;;
1602
1603
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1604
	compiler_flags="$compiler_flags $arg"
1605
	compile_command="$compile_command $arg"
1606
	finalize_command="$finalize_command $arg"
1607
	continue
1608
	;;
1609
1304
      -module)
1610
      -module)
1305
	module=yes
1611
	module=yes
1306
	continue
1612
	continue
1307
	;;
1613
	;;
1308
1614
1309
      # gcc -m* arguments should be passed to the linker via $compiler_flags
1615
      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1310
      # in order to pass architecture information to the linker
1616
      # -r[0-9][0-9]* specifies the processor on the SGI compiler
1311
      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
1617
      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1312
      # but this is not reliable with gcc because gcc may use -mfoo to
1618
      # +DA*, +DD* enable 64-bit mode on the HP compiler
1313
      # select a different linker, different libraries, etc, while
1619
      # -q* pass through compiler args for the IBM compiler
1314
      # -Wl,-mfoo simply passes -mfoo to the linker.
1620
      # -m* pass through architecture-specific compiler args for GCC
1315
      -m*)
1621
      # -m*, -t[45]*, -txscale* pass through architecture-specific
1622
      # compiler args for GCC
1623
      # -pg pass through profiling flag for GCC
1624
      # @file GCC response files
1625
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1626
      -t[45]*|-txscale*|@*)
1627
1316
	# Unknown arguments in both finalize_command and compile_command need
1628
	# Unknown arguments in both finalize_command and compile_command need
1317
	# to be aesthetically quoted because they are evaled later.
1629
	# to be aesthetically quoted because they are evaled later.
1318
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1630
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Lines 1323-1331 Link Here
1323
	esac
1635
	esac
1324
        compile_command="$compile_command $arg"
1636
        compile_command="$compile_command $arg"
1325
        finalize_command="$finalize_command $arg"
1637
        finalize_command="$finalize_command $arg"
1326
        if test "$with_gcc" = "yes" ; then
1638
        compiler_flags="$compiler_flags $arg"
1327
          compiler_flags="$compiler_flags $arg"
1328
        fi
1329
        continue
1639
        continue
1330
        ;;
1640
        ;;
1331
1641
Lines 1365-1370 Link Here
1365
1675
1366
      -o) prev=output ;;
1676
      -o) prev=output ;;
1367
1677
1678
      -precious-files-regex)
1679
	prev=precious_regex
1680
	continue
1681
	;;
1682
1368
      -release)
1683
      -release)
1369
	prev=release
1684
	prev=release
1370
	continue
1685
	continue
Lines 1387-1393 Link Here
1387
	[\\/]* | [A-Za-z]:[\\/]*) ;;
1702
	[\\/]* | [A-Za-z]:[\\/]*) ;;
1388
	*)
1703
	*)
1389
	  $echo "$modename: only absolute run-paths are allowed" 1>&2
1704
	  $echo "$modename: only absolute run-paths are allowed" 1>&2
1390
	  exit 1
1705
	  exit $EXIT_FAILURE
1391
	  ;;
1706
	  ;;
1392
	esac
1707
	esac
1393
	case "$xrpath " in
1708
	case "$xrpath " in
Lines 1473-1483 Link Here
1473
	continue
1788
	continue
1474
	;;
1789
	;;
1475
1790
1476
      -framework)
1477
        prev=framework
1478
	continue
1479
	;;
1480
1481
      # Some other compiler flag.
1791
      # Some other compiler flag.
1482
      -* | +*)
1792
      -* | +*)
1483
	# Unknown arguments in both finalize_command and compile_command need
1793
	# Unknown arguments in both finalize_command and compile_command need
Lines 1488-1494 Link Here
1488
	  arg="\"$arg\""
1798
	  arg="\"$arg\""
1489
	  ;;
1799
	  ;;
1490
	esac
1800
	esac
1491
	add_flags="$add_flags $arg"
1492
	;;
1801
	;;
1493
1802
1494
      *.$objext)
1803
      *.$objext)
Lines 1516-1522 Link Here
1516
	     test "$pic_object" = none && \
1825
	     test "$pic_object" = none && \
1517
	     test "$non_pic_object" = none; then
1826
	     test "$non_pic_object" = none; then
1518
	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1827
	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1519
	    exit 1
1828
	    exit $EXIT_FAILURE
1520
	  fi
1829
	  fi
1521
1830
1522
	  # Extract subdirectory from the argument.
1831
	  # Extract subdirectory from the argument.
Lines 1564-1575 Link Here
1564
	    if test -z "$pic_object" || test "$pic_object" = none ; then
1873
	    if test -z "$pic_object" || test "$pic_object" = none ; then
1565
	      arg="$non_pic_object"
1874
	      arg="$non_pic_object"
1566
	    fi
1875
	    fi
1876
	  else
1877
	    # If the PIC object exists, use it instead.
1878
	    # $xdir was prepended to $pic_object above.
1879
	    non_pic_object="$pic_object"
1880
	    non_pic_objects="$non_pic_objects $non_pic_object"
1567
	  fi
1881
	  fi
1568
	else
1882
	else
1569
	  # Only an error if not doing a dry-run.
1883
	  # Only an error if not doing a dry-run.
1570
	  if test -z "$run"; then
1884
	  if test -z "$run"; then
1571
	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1885
	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1572
	    exit 1
1886
	    exit $EXIT_FAILURE
1573
	  else
1887
	  else
1574
	    # Dry-run case.
1888
	    # Dry-run case.
1575
1889
Lines 1623-1629 Link Here
1623
	  arg="\"$arg\""
1937
	  arg="\"$arg\""
1624
	  ;;
1938
	  ;;
1625
	esac
1939
	esac
1626
	add_flags="$add_flags $arg"
1627
	;;
1940
	;;
1628
      esac # arg
1941
      esac # arg
1629
1942
Lines 1637-1684 Link Here
1637
    if test -n "$prev"; then
1950
    if test -n "$prev"; then
1638
      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1951
      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1639
      $echo "$help" 1>&2
1952
      $echo "$help" 1>&2
1640
      exit 1
1953
      exit $EXIT_FAILURE
1641
    fi
1642
1643
    # Infer tagged configuration to use if any are available and
1644
    # if one wasn't chosen via the "--tag" command line option.
1645
    # Only attempt this if the compiler in the base link
1646
    # command doesn't match the default compiler.
1647
    if test -n "$available_tags" && test -z "$tagname"; then
1648
      case $base_compile in
1649
      # Blanks in the command may have been stripped by the calling shell,
1650
      # but not from the CC environment variable when configure was run.
1651
      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
1652
      # Blanks at the start of $base_compile will cause this to fail
1653
      # if we don't check for them as well.
1654
      *)
1655
	for z in $available_tags; do
1656
	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
1657
	    # Evaluate the configuration.
1658
	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1659
	    case $base_compile in
1660
	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
1661
	      # The compiler in $compile_command matches
1662
	      # the one in the tagged configuration.
1663
	      # Assume this is the tagged configuration we want.
1664
	      tagname=$z
1665
	      break
1666
	      ;;
1667
	    esac
1668
	  fi
1669
	done
1670
	# If $tagname still isn't set, then no tagged configuration
1671
	# was found and let the user know that the "--tag" command
1672
	# line option must be used.
1673
	if test -z "$tagname"; then
1674
	  $echo "$modename: unable to infer tagged configuration"
1675
	  $echo "$modename: specify a tag with \`--tag'" 1>&2
1676
	  exit 1
1677
#       else
1678
#         $echo "$modename: using $tagname tagged configuration"
1679
	fi
1680
	;;
1681
      esac
1682
    fi
1954
    fi
1683
1955
1684
    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1956
    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
Lines 1711-1719 Link Here
1711
    if test ! -d "$output_objdir"; then
1983
    if test ! -d "$output_objdir"; then
1712
      $show "$mkdir $output_objdir"
1984
      $show "$mkdir $output_objdir"
1713
      $run $mkdir $output_objdir
1985
      $run $mkdir $output_objdir
1714
      status=$?
1986
      exit_status=$?
1715
      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
1987
      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
1716
	exit $status
1988
	exit $exit_status
1717
      fi
1989
      fi
1718
    fi
1990
    fi
1719
1991
Lines 1722-1728 Link Here
1722
    "")
1994
    "")
1723
      $echo "$modename: you must specify an output file" 1>&2
1995
      $echo "$modename: you must specify an output file" 1>&2
1724
      $echo "$help" 1>&2
1996
      $echo "$help" 1>&2
1725
      exit 1
1997
      exit $EXIT_FAILURE
1726
      ;;
1998
      ;;
1727
    *.$libext) linkmode=oldlib ;;
1999
    *.$libext) linkmode=oldlib ;;
1728
    *.lo | *.$objext) linkmode=obj ;;
2000
    *.lo | *.$objext) linkmode=obj ;;
Lines 1732-1738 Link Here
1732
2004
1733
    case $host in
2005
    case $host in
1734
    *cygwin* | *mingw* | *pw32*)
2006
    *cygwin* | *mingw* | *pw32*)
1735
      # don't eliminate duplcations in $postdeps and $predeps
2007
      # don't eliminate duplications in $postdeps and $predeps
1736
      duplicate_compiler_generated_deps=yes
2008
      duplicate_compiler_generated_deps=yes
1737
      ;;
2009
      ;;
1738
    *)
2010
    *)
Lines 1776-1782 Link Here
1776
    newlib_search_path=
2048
    newlib_search_path=
1777
    need_relink=no # whether we're linking any uninstalled libtool libraries
2049
    need_relink=no # whether we're linking any uninstalled libtool libraries
1778
    notinst_deplibs= # not-installed libtool libraries
2050
    notinst_deplibs= # not-installed libtool libraries
1779
    notinst_path= # paths that contain not-installed libtool libraries
1780
    case $linkmode in
2051
    case $linkmode in
1781
    lib)
2052
    lib)
1782
	passes="conv link"
2053
	passes="conv link"
Lines 1785-1791 Link Here
1785
	  *.la) ;;
2056
	  *.la) ;;
1786
	  *)
2057
	  *)
1787
	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2058
	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1788
	    exit 1
2059
	    exit $EXIT_FAILURE
1789
	    ;;
2060
	    ;;
1790
	  esac
2061
	  esac
1791
	done
2062
	done
Lines 1811-1817 Link Here
1811
	case $pass in
2082
	case $pass in
1812
	dlopen) libs="$dlfiles" ;;
2083
	dlopen) libs="$dlfiles" ;;
1813
	dlpreopen) libs="$dlprefiles" ;;
2084
	dlpreopen) libs="$dlprefiles" ;;
1814
	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2085
	link)
2086
	  libs="$deplibs %DEPLIBS%"
2087
	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2088
	  ;;
1815
	esac
2089
	esac
1816
      fi
2090
      fi
1817
      if test "$pass" = dlopen; then
2091
      if test "$pass" = dlopen; then
Lines 1823-1840 Link Here
1823
	lib=
2097
	lib=
1824
	found=no
2098
	found=no
1825
	case $deplib in
2099
	case $deplib in
2100
	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2101
	  if test "$linkmode,$pass" = "prog,link"; then
2102
	    compile_deplibs="$deplib $compile_deplibs"
2103
	    finalize_deplibs="$deplib $finalize_deplibs"
2104
	  else
2105
	    compiler_flags="$compiler_flags $deplib"
2106
	  fi
2107
	  continue
2108
	  ;;
1826
	-l*)
2109
	-l*)
1827
	  if test "$linkmode" != lib && test "$linkmode" != prog; then
2110
	  if test "$linkmode" != lib && test "$linkmode" != prog; then
1828
	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2111
	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1829
	    continue
2112
	    continue
1830
	  fi
2113
	  fi
1831
	  if test "$pass" = conv && test "$allow_undefined" = yes; then
1832
	    deplibs="$deplib $deplibs"
1833
	    continue
1834
	  fi
1835
	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2114
	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1836
	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2115
	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1837
	    for search_ext in .la $shrext .so .a; do
2116
	    for search_ext in .la $std_shrext .so .a; do
1838
	      # Search the libtool library
2117
	      # Search the libtool library
1839
	      lib="$searchdir/lib${name}${search_ext}"
2118
	      lib="$searchdir/lib${name}${search_ext}"
1840
	      if test -f "$lib"; then
2119
	      if test -f "$lib"; then
Lines 1895-1912 Link Here
1895
	    fi
2174
	    fi
1896
	  fi
2175
	  fi
1897
	  ;; # -l
2176
	  ;; # -l
1898
	*.ltframework)
1899
	  if test "$linkmode,$pass" = "prog,link"; then
1900
	    compile_deplibs="$deplib $compile_deplibs"
1901
	    finalize_deplibs="$deplib $finalize_deplibs"
1902
	  else
1903
	    deplibs="$deplib $deplibs"
1904
	    if test "$linkmode" = lib ; then
1905
	      newdependency_libs="$deplib $newdependency_libs"
1906
	    fi
1907
	  fi
1908
	  continue
1909
	  ;;
1910
	-L*)
2177
	-L*)
1911
	  case $linkmode in
2178
	  case $linkmode in
1912
	  lib)
2179
	  lib)
Lines 1922-1932 Link Here
1922
	    fi
2189
	    fi
1923
	    if test "$pass" = scan; then
2190
	    if test "$pass" = scan; then
1924
	      deplibs="$deplib $deplibs"
2191
	      deplibs="$deplib $deplibs"
1925
	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1926
	    else
2192
	    else
1927
	      compile_deplibs="$deplib $compile_deplibs"
2193
	      compile_deplibs="$deplib $compile_deplibs"
1928
	      finalize_deplibs="$deplib $finalize_deplibs"
2194
	      finalize_deplibs="$deplib $finalize_deplibs"
1929
	    fi
2195
	    fi
2196
	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1930
	    ;;
2197
	    ;;
1931
	  *)
2198
	  *)
1932
	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2199
	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
Lines 1954-1960 Link Here
1954
	  fi
2221
	  fi
1955
	  case $linkmode in
2222
	  case $linkmode in
1956
	  lib)
2223
	  lib)
1957
	    if test "$deplibs_check_method" != pass_all; then
2224
	    valid_a_lib=no
2225
	    case $deplibs_check_method in
2226
	      match_pattern*)
2227
		set dummy $deplibs_check_method
2228
	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2229
		if eval $echo \"$deplib\" 2>/dev/null \
2230
		    | $SED 10q \
2231
		    | $EGREP "$match_pattern_regex" > /dev/null; then
2232
		  valid_a_lib=yes
2233
		fi
2234
		;;
2235
	      pass_all)
2236
		valid_a_lib=yes
2237
		;;
2238
            esac
2239
	    if test "$valid_a_lib" != yes; then
1958
	      $echo
2240
	      $echo
1959
	      $echo "*** Warning: Trying to link with static lib archive $deplib."
2241
	      $echo "*** Warning: Trying to link with static lib archive $deplib."
1960
	      $echo "*** I have the capability to make that library automatically link in when"
2242
	      $echo "*** I have the capability to make that library automatically link in when"
Lines 2004-2018 Link Here
2004
	esac # case $deplib
2286
	esac # case $deplib
2005
	if test "$found" = yes || test -f "$lib"; then :
2287
	if test "$found" = yes || test -f "$lib"; then :
2006
	else
2288
	else
2007
	  $echo "$modename: cannot find the library \`$lib'" 1>&2
2289
	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2008
	  exit 1
2290
	  exit $EXIT_FAILURE
2009
	fi
2291
	fi
2010
2292
2011
	# Check to see that this really is a libtool archive.
2293
	# Check to see that this really is a libtool archive.
2012
	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2294
	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2013
	else
2295
	else
2014
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2296
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2015
	  exit 1
2297
	  exit $EXIT_FAILURE
2016
	fi
2298
	fi
2017
2299
2018
	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2300
	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
Lines 2028-2033 Link Here
2028
	# it will not redefine variables installed, or shouldnotlink
2310
	# it will not redefine variables installed, or shouldnotlink
2029
	installed=yes
2311
	installed=yes
2030
	shouldnotlink=no
2312
	shouldnotlink=no
2313
	avoidtemprpath=
2314
2031
2315
2032
	# Read the .la file
2316
	# Read the .la file
2033
	case $lib in
2317
	case $lib in
Lines 2035-2047 Link Here
2035
	*) . ./$lib ;;
2319
	*) . ./$lib ;;
2036
	esac
2320
	esac
2037
2321
2038
	case $host in
2039
	*-*-darwin*)
2040
	  # Convert "-framework foo" to "foo.ltframework" in dependency_libs
2041
	  test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
2042
	  ;;
2043
	esac
2044
2045
	if test "$linkmode,$pass" = "lib,link" ||
2322
	if test "$linkmode,$pass" = "lib,link" ||
2046
	   test "$linkmode,$pass" = "prog,scan" ||
2323
	   test "$linkmode,$pass" = "prog,scan" ||
2047
	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2324
	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
Lines 2052-2084 Link Here
2052
	if test "$pass" = conv; then
2329
	if test "$pass" = conv; then
2053
	  # Only check for convenience libraries
2330
	  # Only check for convenience libraries
2054
	  deplibs="$lib $deplibs"
2331
	  deplibs="$lib $deplibs"
2055
	  tmp_libs=
2056
	  for deplib in $dependency_libs; do
2057
	    #echo "Adding $deplib to \$deplibs"
2058
	    deplibs="$deplib $deplibs"
2059
            if test "X$duplicate_deps" = "Xyes" ; then
2060
	      case "$tmp_libs " in
2061
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2062
	      esac
2063
            fi
2064
	    tmp_libs="$tmp_libs $deplib"
2065
	  done
2066
	  if test -z "$libdir"; then
2332
	  if test -z "$libdir"; then
2067
	    if test -z "$old_library"; then
2333
	    if test -z "$old_library"; then
2068
	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2334
	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2069
	      exit 1
2335
	      exit $EXIT_FAILURE
2070
	    fi
2336
	    fi
2071
	    # It is a libtool convenience library, so add in its objects.
2337
	    # It is a libtool convenience library, so add in its objects.
2072
	    convenience="$convenience $ladir/$objdir/$old_library"
2338
	    convenience="$convenience $ladir/$objdir/$old_library"
2073
	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
2339
	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
2340
	    tmp_libs=
2341
	    for deplib in $dependency_libs; do
2342
	      deplibs="$deplib $deplibs"
2343
              if test "X$duplicate_deps" = "Xyes" ; then
2344
	        case "$tmp_libs " in
2345
	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2346
	        esac
2347
              fi
2348
	      tmp_libs="$tmp_libs $deplib"
2349
	    done
2074
	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
2350
	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
2075
	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
2351
	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
2076
	    exit 1
2352
	    exit $EXIT_FAILURE
2077
	  fi
2353
	  fi
2078
	  continue
2354
	  continue
2079
	fi # $pass = conv
2355
	fi # $pass = conv
2080
2356
2081
    
2357
2082
	# Get the name of the library we link against.
2358
	# Get the name of the library we link against.
2083
	linklib=
2359
	linklib=
2084
	for l in $old_library $library_names; do
2360
	for l in $old_library $library_names; do
Lines 2086-2101 Link Here
2086
	done
2362
	done
2087
	if test -z "$linklib"; then
2363
	if test -z "$linklib"; then
2088
	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2364
	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2089
	  exit 1
2365
	  exit $EXIT_FAILURE
2090
	fi
2366
	fi
2091
2367
2092
	# This library was specified with -dlopen.
2368
	# This library was specified with -dlopen.
2093
	if test "$pass" = dlopen; then
2369
	if test "$pass" = dlopen; then
2094
	  if test -z "$libdir"; then
2370
	  if test -z "$libdir"; then
2095
	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2371
	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2096
	    exit 1
2372
	    exit $EXIT_FAILURE
2097
	  fi
2373
	  fi
2098
	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2374
	  if test -z "$dlname" ||
2375
	     test "$dlopen_support" != yes ||
2376
	     test "$build_libtool_libs" = no; then
2099
	    # If there is no dlname, no dlopen support or we're linking
2377
	    # If there is no dlname, no dlopen support or we're linking
2100
	    # statically, we need to preload.  We also need to preload any
2378
	    # statically, we need to preload.  We also need to preload any
2101
	    # dependent libraries so libltdl's deplib preloader doesn't
2379
	    # dependent libraries so libltdl's deplib preloader doesn't
Lines 2132-2142 Link Here
2132
	    dir="$libdir"
2410
	    dir="$libdir"
2133
	    absdir="$libdir"
2411
	    absdir="$libdir"
2134
	  fi
2412
	  fi
2413
	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2135
	else
2414
	else
2136
	  dir="$ladir/$objdir"
2415
	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2137
	  absdir="$abs_ladir/$objdir"
2416
	    dir="$ladir"
2138
	  # Remove this search path later
2417
	    absdir="$abs_ladir"
2139
	  notinst_path="$notinst_path $abs_ladir"
2418
	    # Remove this search path later
2419
	    notinst_path="$notinst_path $abs_ladir"
2420
	  else
2421
	    dir="$ladir/$objdir"
2422
	    absdir="$abs_ladir/$objdir"
2423
	    # Remove this search path later
2424
	    notinst_path="$notinst_path $abs_ladir"
2425
	  fi
2140
	fi # $installed = yes
2426
	fi # $installed = yes
2141
	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2427
	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2142
2428
Lines 2144-2150 Link Here
2144
	if test "$pass" = dlpreopen; then
2430
	if test "$pass" = dlpreopen; then
2145
	  if test -z "$libdir"; then
2431
	  if test -z "$libdir"; then
2146
	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2432
	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2147
	    exit 1
2433
	    exit $EXIT_FAILURE
2148
	  fi
2434
	  fi
2149
	  # Prefer using a static library (so that no silly _DYNAMIC symbols
2435
	  # Prefer using a static library (so that no silly _DYNAMIC symbols
2150
	  # are required to link).
2436
	  # are required to link).
Lines 2171-2177 Link Here
2171
	  continue
2457
	  continue
2172
	fi
2458
	fi
2173
2459
2174
    
2460
2175
	if test "$linkmode" = prog && test "$pass" != link; then
2461
	if test "$linkmode" = prog && test "$pass" != link; then
2176
	  newlib_search_path="$newlib_search_path $ladir"
2462
	  newlib_search_path="$newlib_search_path $ladir"
2177
	  deplibs="$lib $deplibs"
2463
	  deplibs="$lib $deplibs"
Lines 2209-2220 Link Here
2209
	  if test -n "$library_names" &&
2495
	  if test -n "$library_names" &&
2210
	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2496
	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2211
	    # We need to hardcode the library path
2497
	    # We need to hardcode the library path
2212
	    if test -n "$shlibpath_var"; then
2498
	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2213
	      # Make sure the rpath contains only unique directories.
2499
	      # Make sure the rpath contains only unique directories.
2214
	      case "$temp_rpath " in
2500
	      case "$temp_rpath " in
2215
	      *" $dir "*) ;;
2501
	      *" $dir "*) ;;
2216
	      *" $absdir "*) ;;
2502
	      *" $absdir "*) ;;
2217
	      *) temp_rpath="$temp_rpath $dir" ;;
2503
	      *) temp_rpath="$temp_rpath $absdir" ;;
2218
	      esac
2504
	      esac
2219
	    fi
2505
	    fi
2220
2506
Lines 2251-2274 Link Here
2251
	fi
2537
	fi
2252
2538
2253
	link_static=no # Whether the deplib will be linked statically
2539
	link_static=no # Whether the deplib will be linked statically
2540
	use_static_libs=$prefer_static_libs
2541
	if test "$use_static_libs" = built && test "$installed" = yes ; then
2542
	  use_static_libs=no
2543
	fi
2254
	if test -n "$library_names" &&
2544
	if test -n "$library_names" &&
2255
	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2545
	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
2256
	  if test "$installed" = no; then
2546
	  if test "$installed" = no; then
2257
	    notinst_deplibs="$notinst_deplibs $lib"
2547
	    notinst_deplibs="$notinst_deplibs $lib"
2258
	    need_relink=yes
2548
	    need_relink=yes
2259
	  fi
2549
	  fi
2260
	  # This is a shared library
2550
	  # This is a shared library
2261
	
2551
2262
      # Warn about portability, can't link against -module's on some systems (darwin)
2552
	  # Warn about portability, can't link against -module's on
2263
      if test "$shouldnotlink" = yes && test "$pass" = link ; then
2553
	  # some systems (darwin)
2554
	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
2264
	    $echo
2555
	    $echo
2265
	    if test "$linkmode" = prog; then
2556
	    if test "$linkmode" = prog; then
2266
	      $echo "*** Warning: Linking the executable $output against the loadable module"
2557
	      $echo "*** Warning: Linking the executable $output against the loadable module"
2267
	    else
2558
	    else
2268
	      $echo "*** Warning: Linking the shared library $output against the loadable module"
2559
	      $echo "*** Warning: Linking the shared library $output against the loadable module"
2269
	    fi
2560
	    fi
2270
	    $echo "*** $linklib is not portable!"    
2561
	    $echo "*** $linklib is not portable!"
2271
      fi	  
2562
	  fi
2272
	  if test "$linkmode" = lib &&
2563
	  if test "$linkmode" = lib &&
2273
	     test "$hardcode_into_libs" = yes; then
2564
	     test "$hardcode_into_libs" = yes; then
2274
	    # Hardcode the library path.
2565
	    # Hardcode the library path.
Lines 2326-2334 Link Here
2326
	    else
2617
	    else
2327
	      $show "extracting exported symbol list from \`$soname'"
2618
	      $show "extracting exported symbol list from \`$soname'"
2328
	      save_ifs="$IFS"; IFS='~'
2619
	      save_ifs="$IFS"; IFS='~'
2329
	      eval cmds=\"$extract_expsyms_cmds\"
2620
	      cmds=$extract_expsyms_cmds
2330
	      for cmd in $cmds; do
2621
	      for cmd in $cmds; do
2331
		IFS="$save_ifs"
2622
		IFS="$save_ifs"
2623
		eval cmd=\"$cmd\"
2332
		$show "$cmd"
2624
		$show "$cmd"
2333
		$run eval "$cmd" || exit $?
2625
		$run eval "$cmd" || exit $?
2334
	      done
2626
	      done
Lines 2339-2347 Link Here
2339
	    if test -f "$output_objdir/$newlib"; then :; else
2631
	    if test -f "$output_objdir/$newlib"; then :; else
2340
	      $show "generating import library for \`$soname'"
2632
	      $show "generating import library for \`$soname'"
2341
	      save_ifs="$IFS"; IFS='~'
2633
	      save_ifs="$IFS"; IFS='~'
2342
	      eval cmds=\"$old_archive_from_expsyms_cmds\"
2634
	      cmds=$old_archive_from_expsyms_cmds
2343
	      for cmd in $cmds; do
2635
	      for cmd in $cmds; do
2344
		IFS="$save_ifs"
2636
		IFS="$save_ifs"
2637
		eval cmd=\"$cmd\"
2345
		$show "$cmd"
2638
		$show "$cmd"
2346
		$run eval "$cmd" || exit $?
2639
		$run eval "$cmd" || exit $?
2347
	      done
2640
	      done
Lines 2362-2372 Link Here
2362
	      if test "$hardcode_direct" = no; then
2655
	      if test "$hardcode_direct" = no; then
2363
		add="$dir/$linklib"
2656
		add="$dir/$linklib"
2364
		case $host in
2657
		case $host in
2365
		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
2658
		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2659
		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2660
		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2661
		    *-*-unixware7*) add_dir="-L$dir" ;;
2366
		  *-*-darwin* )
2662
		  *-*-darwin* )
2367
		    # if the lib is a module then we can not link against it, someone
2663
		    # if the lib is a module then we can not link against
2368
		    # is ignoring the new warnings I added
2664
		    # it, someone is ignoring the new warnings I added
2369
		    if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
2665
		    if /usr/bin/file -L $add 2> /dev/null |
2666
                      $EGREP ": [^:]* bundle" >/dev/null ; then
2370
		      $echo "** Warning, lib $linklib is a module, not a shared library"
2667
		      $echo "** Warning, lib $linklib is a module, not a shared library"
2371
		      if test -z "$old_library" ; then
2668
		      if test -z "$old_library" ; then
2372
		        $echo
2669
		        $echo
Lines 2374-2380 Link Here
2374
		        $echo "** The link will probably fail, sorry"
2671
		        $echo "** The link will probably fail, sorry"
2375
		      else
2672
		      else
2376
		        add="$dir/$old_library"
2673
		        add="$dir/$old_library"
2377
		      fi 
2674
		      fi
2378
		    fi
2675
		    fi
2379
		esac
2676
		esac
2380
	      elif test "$hardcode_minus_L" = no; then
2677
	      elif test "$hardcode_minus_L" = no; then
Lines 2397-2405 Link Here
2397
		add_dir="-L$dir"
2694
		add_dir="-L$dir"
2398
		# Try looking first in the location we're being installed to.
2695
		# Try looking first in the location we're being installed to.
2399
		if test -n "$inst_prefix_dir"; then
2696
		if test -n "$inst_prefix_dir"; then
2400
		  case "$libdir" in
2697
		  case $libdir in
2401
		    [\\/]*)
2698
		    [\\/]*)
2402
		      add_dir="-L$inst_prefix_dir$libdir $add_dir"
2699
		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
2403
		      ;;
2700
		      ;;
2404
		  esac
2701
		  esac
2405
		fi
2702
		fi
Lines 2416-2422 Link Here
2416
2713
2417
	    if test "$lib_linked" != yes; then
2714
	    if test "$lib_linked" != yes; then
2418
	      $echo "$modename: configuration error: unsupported hardcode properties"
2715
	      $echo "$modename: configuration error: unsupported hardcode properties"
2419
	      exit 1
2716
	      exit $EXIT_FAILURE
2420
	    fi
2717
	    fi
2421
2718
2422
	    if test -n "$add_shlibpath"; then
2719
	    if test -n "$add_shlibpath"; then
Lines 2459-2465 Link Here
2459
	      esac
2756
	      esac
2460
	      add="-l$name"
2757
	      add="-l$name"
2461
	    elif test "$hardcode_automatic" = yes; then
2758
	    elif test "$hardcode_automatic" = yes; then
2462
	      if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
2759
	      if test -n "$inst_prefix_dir" &&
2760
		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2463
	        add="$inst_prefix_dir$libdir/$linklib"
2761
	        add="$inst_prefix_dir$libdir/$linklib"
2464
	      else
2762
	      else
2465
	        add="$libdir/$linklib"
2763
	        add="$libdir/$linklib"
Lines 2469-2477 Link Here
2469
	      add_dir="-L$libdir"
2767
	      add_dir="-L$libdir"
2470
	      # Try looking first in the location we're being installed to.
2768
	      # Try looking first in the location we're being installed to.
2471
	      if test -n "$inst_prefix_dir"; then
2769
	      if test -n "$inst_prefix_dir"; then
2472
		case "$libdir" in
2770
		case $libdir in
2473
		  [\\/]*)
2771
		  [\\/]*)
2474
		    add_dir="-L$inst_prefix_dir$libdir $add_dir"
2772
		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
2475
		    ;;
2773
		    ;;
2476
		esac
2774
		esac
2477
	      fi
2775
	      fi
Lines 2530-2546 Link Here
2530
	      fi
2828
	      fi
2531
	    fi
2829
	    fi
2532
	  else
2830
	  else
2533
	    convenience="$convenience $dir/$old_library"
2534
	    old_convenience="$old_convenience $dir/$old_library"
2535
	    deplibs="$dir/$old_library $deplibs"
2831
	    deplibs="$dir/$old_library $deplibs"
2536
	    link_static=yes
2832
	    link_static=yes
2537
	  fi
2833
	  fi
2538
	fi # link shared/static library?
2834
	fi # link shared/static library?
2539
2835
2540
	if test "$linkmode" = lib; then
2836
	if test "$linkmode" = lib; then
2541
	  #if test -n "$dependency_libs" &&
2837
	  if test -n "$dependency_libs" &&
2542
	  #   { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
2838
	     { test "$hardcode_into_libs" != yes ||
2543
	  #     test "$link_static" = yes; }; then
2839
	       test "$build_old_libs" = yes ||
2840
	       test "$link_static" = yes; }; then
2544
	    # Extract -R from dependency_libs
2841
	    # Extract -R from dependency_libs
2545
	    temp_deplibs=
2842
	    temp_deplibs=
2546
	    for libdir in $dependency_libs; do
2843
	    for libdir in $dependency_libs; do
Lines 2554-2560 Link Here
2554
	      esac
2851
	      esac
2555
	    done
2852
	    done
2556
	    dependency_libs="$temp_deplibs"
2853
	    dependency_libs="$temp_deplibs"
2557
	  #fi
2854
	  fi
2558
2855
2559
	  newlib_search_path="$newlib_search_path $absdir"
2856
	  newlib_search_path="$newlib_search_path $absdir"
2560
	  # Link against this library
2857
	  # Link against this library
Lines 2596-2615 Link Here
2596
		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2893
		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2597
		  if test -z "$libdir"; then
2894
		  if test -z "$libdir"; then
2598
		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2895
		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2599
		    exit 1
2896
		    exit $EXIT_FAILURE
2600
		  fi
2897
		  fi
2601
		  if test "$absdir" != "$libdir"; then
2898
		  if test "$absdir" != "$libdir"; then
2602
		    # Sure, some shells/systems don't implement the -ef.
2899
		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2603
		    # Those will have to live with the warning.
2604
		    test "$absdir" -ef "$libdir" > /dev/null 2>&1 ||
2605
		      $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2606
		  fi
2900
		  fi
2607
		  path="$absdir"
2901
		  path="$absdir"
2608
		fi
2902
		fi
2609
		depdepl=
2903
		depdepl=
2610
		case $host in
2904
		case $host in
2611
		*-*-darwin*)
2905
		*-*-darwin*)
2612
		  # we do not want to link against static libs, but need to link against shared
2906
		  # we do not want to link against static libs,
2907
		  # but need to link against shared
2613
		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2908
		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2614
		  if test -n "$deplibrary_names" ; then
2909
		  if test -n "$deplibrary_names" ; then
2615
		    for tmp in $deplibrary_names ; do
2910
		    for tmp in $deplibrary_names ; do
Lines 2617-2671 Link Here
2617
		    done
2912
		    done
2618
		    if test -f "$path/$depdepl" ; then
2913
		    if test -f "$path/$depdepl" ; then
2619
		      depdepl="$path/$depdepl"
2914
		      depdepl="$path/$depdepl"
2620
		   fi
2915
		    fi
2621
		    # do not add paths which are already there
2916
		    # do not add paths which are already there
2622
		    case " $newlib_search_path " in
2917
		    case " $newlib_search_path " in
2623
		    *" $path "*) ;;
2918
		    *" $path "*) ;;
2624
		    *) newlib_search_path="$newlib_search_path $path";;
2919
		    *) newlib_search_path="$newlib_search_path $path";;
2625
		    esac
2920
		    esac
2626
		    path=""
2627
		  fi
2921
		  fi
2922
		  path=""
2628
		  ;;
2923
		  ;;
2629
		*)
2924
		*)
2630
		path="-L$path"
2925
		  path="-L$path"
2631
		;;
2926
		  ;;
2632
		esac 
2927
		esac
2633
		
2634
		;;
2928
		;;
2635
		  -l*)
2929
	      -l*)
2636
		case $host in
2930
		case $host in
2637
		*-*-darwin*)
2931
		*-*-darwin*)
2638
		 # Again, we only want to link against shared libraries
2932
		  # Again, we only want to link against shared libraries
2639
		 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2933
		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2640
		 for tmp in $newlib_search_path ; do
2934
		  for tmp in $newlib_search_path ; do
2641
		     if test -f "$tmp/lib$tmp_libs.dylib" ; then
2935
		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
2642
		       eval depdepl="$tmp/lib$tmp_libs.dylib"
2936
		      eval depdepl="$tmp/lib$tmp_libs.dylib"
2643
		       break
2937
		      break
2644
		     fi  
2938
		    fi
2645
         done
2939
		  done
2646
         path=""
2940
		  path=""
2647
		  ;;
2941
		  ;;
2648
		*) continue ;;
2942
		*) continue ;;
2649
		esac  		  
2650
		;;
2651
2652
	      *.ltframework)
2653
		case $host in
2654
		  *-*-darwin*)
2655
		    depdepl="$deplib"
2656
		    ;;
2657
		esac
2943
		esac
2658
		;;
2944
		;;
2659
2660
	      *) continue ;;
2945
	      *) continue ;;
2661
	      esac
2946
	      esac
2662
	      case " $deplibs " in
2947
	      case " $deplibs " in
2663
	      *" $depdepl "*) ;;
2664
	      *) deplibs="$deplibs $depdepl" ;;
2665
	      esac	      
2666
	      case " $deplibs " in
2667
	      *" $path "*) ;;
2948
	      *" $path "*) ;;
2668
	      *) deplibs="$deplibs $path" ;;
2949
	      *) deplibs="$path $deplibs" ;;
2950
	      esac
2951
	      case " $deplibs " in
2952
	      *" $depdepl "*) ;;
2953
	      *) deplibs="$depdepl $deplibs" ;;
2669
	      esac
2954
	      esac
2670
	    done
2955
	    done
2671
	  fi # link_all_deplibs != no
2956
	  fi # link_all_deplibs != no
Lines 2752-2758 Link Here
2752
	  eval $var=\"$tmp_libs\"
3037
	  eval $var=\"$tmp_libs\"
2753
	done # for var
3038
	done # for var
2754
      fi
3039
      fi
2755
      # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
3040
      # Last step: remove runtime libs from dependency_libs
3041
      # (they stay in deplibs)
2756
      tmp_libs=
3042
      tmp_libs=
2757
      for i in $dependency_libs ; do
3043
      for i in $dependency_libs ; do
2758
	case " $predeps $postdeps $compiler_lib_search_path " in
3044
	case " $predeps $postdeps $compiler_lib_search_path " in
Lines 2812-2830 Link Here
2812
      case $outputname in
3098
      case $outputname in
2813
      lib*)
3099
      lib*)
2814
	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3100
	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2815
	eval shared_ext=\"$shrext\"
3101
	eval shared_ext=\"$shrext_cmds\"
2816
	eval libname=\"$libname_spec\"
3102
	eval libname=\"$libname_spec\"
2817
	;;
3103
	;;
2818
      *)
3104
      *)
2819
	if test "$module" = no; then
3105
	if test "$module" = no; then
2820
	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3106
	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2821
	  $echo "$help" 1>&2
3107
	  $echo "$help" 1>&2
2822
	  exit 1
3108
	  exit $EXIT_FAILURE
2823
	fi
3109
	fi
2824
	if test "$need_lib_prefix" != no; then
3110
	if test "$need_lib_prefix" != no; then
2825
	  # Add the "lib" prefix for modules if required
3111
	  # Add the "lib" prefix for modules if required
2826
	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3112
	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2827
	  eval shared_ext=\"$shrext\"
3113
	  eval shared_ext=\"$shrext_cmds\"
2828
	  eval libname=\"$libname_spec\"
3114
	  eval libname=\"$libname_spec\"
2829
	else
3115
	else
2830
	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3116
	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
Lines 2835-2841 Link Here
2835
      if test -n "$objs"; then
3121
      if test -n "$objs"; then
2836
	if test "$deplibs_check_method" != pass_all; then
3122
	if test "$deplibs_check_method" != pass_all; then
2837
	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3123
	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2838
	  exit 1
3124
	  exit $EXIT_FAILURE
2839
	else
3125
	else
2840
	  $echo
3126
	  $echo
2841
	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
3127
	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
Lines 2883-2895 Link Here
2883
	if test -n "$8"; then
3169
	if test -n "$8"; then
2884
	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
3170
	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
2885
	  $echo "$help" 1>&2
3171
	  $echo "$help" 1>&2
2886
	  exit 1
3172
	  exit $EXIT_FAILURE
2887
	fi
3173
	fi
2888
3174
2889
	# convert absolute version numbers to libtool ages
3175
	# convert absolute version numbers to libtool ages
2890
	# this retains compatibility with .la files and attempts
3176
	# this retains compatibility with .la files and attempts
2891
	# to make the code below a bit more comprehensible
3177
	# to make the code below a bit more comprehensible
2892
	
3178
2893
	case $vinfo_number in
3179
	case $vinfo_number in
2894
	yes)
3180
	yes)
2895
	  number_major="$2"
3181
	  number_major="$2"
Lines 2918-2923 Link Here
2918
	    age="$number_minor"
3204
	    age="$number_minor"
2919
	    revision="$number_minor"
3205
	    revision="$number_minor"
2920
	    ;;
3206
	    ;;
3207
	  *)
3208
	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
3209
	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3210
	    exit $EXIT_FAILURE
3211
	    ;;
2921
	  esac
3212
	  esac
2922
	  ;;
3213
	  ;;
2923
	no)
3214
	no)
Lines 2929-2964 Link Here
2929
3220
2930
	# Check that each of the things are valid numbers.
3221
	# Check that each of the things are valid numbers.
2931
	case $current in
3222
	case $current in
2932
	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3223
	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]) ;;
2933
	*)
3224
	*)
2934
	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3225
	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
2935
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3226
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2936
	  exit 1
3227
	  exit $EXIT_FAILURE
2937
	  ;;
3228
	  ;;
2938
	esac
3229
	esac
2939
3230
2940
	case $revision in
3231
	case $revision in
2941
	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3232
	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]) ;;
2942
	*)
3233
	*)
2943
	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3234
	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
2944
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3235
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2945
	  exit 1
3236
	  exit $EXIT_FAILURE
2946
	  ;;
3237
	  ;;
2947
	esac
3238
	esac
2948
3239
2949
	case $age in
3240
	case $age in
2950
	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3241
	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]) ;;
2951
	*)
3242
	*)
2952
	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3243
	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
2953
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3244
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2954
	  exit 1
3245
	  exit $EXIT_FAILURE
2955
	  ;;
3246
	  ;;
2956
	esac
3247
	esac
2957
3248
2958
	if test "$age" -gt "$current"; then
3249
	if test "$age" -gt "$current"; then
2959
	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3250
	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2960
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3251
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2961
	  exit 1
3252
	  exit $EXIT_FAILURE
2962
	fi
3253
	fi
2963
3254
2964
	# Calculate the version variables.
3255
	# Calculate the version variables.
Lines 2975-2981 Link Here
2975
	  versuffix="$major.$age.$revision"
3266
	  versuffix="$major.$age.$revision"
2976
	  # Darwin ld doesn't like 0 for these options...
3267
	  # Darwin ld doesn't like 0 for these options...
2977
	  minor_current=`expr $current + 1`
3268
	  minor_current=`expr $current + 1`
2978
	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3269
	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
2979
	  ;;
3270
	  ;;
2980
3271
2981
	freebsd-aout)
3272
	freebsd-aout)
Lines 3047-3053 Link Here
3047
	*)
3338
	*)
3048
	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
3339
	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
3049
	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3340
	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3050
	  exit 1
3341
	  exit $EXIT_FAILURE
3051
	  ;;
3342
	  ;;
3052
	esac
3343
	esac
3053
3344
Lines 3098-3106 Link Here
3098
	tempremovelist=`$echo "$output_objdir/*"`
3389
	tempremovelist=`$echo "$output_objdir/*"`
3099
	for p in $tempremovelist; do
3390
	for p in $tempremovelist; do
3100
	  case $p in
3391
	  case $p in
3101
	    *.$objext | *$exeext)
3392
	    *.$objext)
3102
	       ;;
3393
	       ;;
3103
	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3394
	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3395
	       if test "X$precious_files_regex" != "X"; then
3396
	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3397
	         then
3398
		   continue
3399
		 fi
3400
	       fi
3104
	       removelist="$removelist $p"
3401
	       removelist="$removelist $p"
3105
	       ;;
3402
	       ;;
3106
	    *) ;;
3403
	    *) ;;
Lines 3122-3130 Link Here
3122
3419
3123
      # Eliminate all temporary directories.
3420
      # Eliminate all temporary directories.
3124
      for path in $notinst_path; do
3421
      for path in $notinst_path; do
3125
	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3422
	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3126
	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3423
	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3127
	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3424
	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3128
      done
3425
      done
3129
3426
3130
      if test -n "$xrpath"; then
3427
      if test -n "$xrpath"; then
Lines 3137-3143 Link Here
3137
	  *) finalize_rpath="$finalize_rpath $libdir" ;;
3434
	  *) finalize_rpath="$finalize_rpath $libdir" ;;
3138
	  esac
3435
	  esac
3139
	done
3436
	done
3140
	if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3437
	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3141
	  dependency_libs="$temp_xrpath $dependency_libs"
3438
	  dependency_libs="$temp_xrpath $dependency_libs"
3142
	fi
3439
	fi
3143
      fi
3440
      fi
Lines 3170-3183 Link Here
3170
	    ;;
3467
	    ;;
3171
	  *-*-rhapsody* | *-*-darwin1.[012])
3468
	  *-*-rhapsody* | *-*-darwin1.[012])
3172
	    # Rhapsody C library is in the System framework
3469
	    # Rhapsody C library is in the System framework
3173
	    deplibs="$deplibs System.ltframework"
3470
	    deplibs="$deplibs -framework System"
3174
	    ;;
3471
	    ;;
3175
	  *-*-netbsd*)
3472
	  *-*-netbsd*)
3176
	    # Don't link with libc until the a.out ld.so is fixed.
3473
	    # Don't link with libc until the a.out ld.so is fixed.
3177
	    ;;
3474
	    ;;
3178
	  *-*-openbsd* | *-*-freebsd*)
3475
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3179
	    # Do not include libc due to us having libc/libc_r.
3476
	    # Do not include libc due to us having libc/libc_r.
3180
	    test "X$arg" = "X-lc" && continue
3477
	    ;;
3478
	  *-*-sco3.2v5* | *-*-sco5v6*)
3479
	    # Causes problems with __ctype
3480
	    ;;
3481
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3482
	    # Compiler inserts libc in the correct place for threads to work
3181
	    ;;
3483
	    ;;
3182
 	  *)
3484
 	  *)
3183
	    # Add libc to deplibs on all other systems if necessary.
3485
	    # Add libc to deplibs on all other systems if necessary.
Lines 3221-3231 Link Here
3221
	  int main() { return 0; }
3523
	  int main() { return 0; }
3222
EOF
3524
EOF
3223
	  $rm conftest
3525
	  $rm conftest
3224
	  $LTCC -o conftest conftest.c $deplibs
3526
	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3225
	  if test "$?" -eq 0 ; then
3527
	  if test "$?" -eq 0 ; then
3226
	    ldd_output=`ldd conftest`
3528
	    ldd_output=`ldd conftest`
3227
	    for i in $deplibs; do
3529
	    for i in $deplibs; do
3228
	      name="`expr $i : '-l\(.*\)'`"
3530
	      name=`expr $i : '-l\(.*\)'`
3229
	      # If $name is empty we are operating on a -L argument.
3531
	      # If $name is empty we are operating on a -L argument.
3230
              if test "$name" != "" && test "$name" -ne "0"; then
3532
              if test "$name" != "" && test "$name" -ne "0"; then
3231
		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3533
		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
Lines 3262-3272 Link Here
3262
	    # Error occurred in the first compile.  Let's try to salvage
3564
	    # Error occurred in the first compile.  Let's try to salvage
3263
	    # the situation: Compile a separate program for each library.
3565
	    # the situation: Compile a separate program for each library.
3264
	    for i in $deplibs; do
3566
	    for i in $deplibs; do
3265
	      name="`expr $i : '-l\(.*\)'`"
3567
	      name=`expr $i : '-l\(.*\)'`
3266
	      # If $name is empty we are operating on a -L argument.
3568
	      # If $name is empty we are operating on a -L argument.
3267
              if test "$name" != "" && test "$name" != "0"; then
3569
              if test "$name" != "" && test "$name" != "0"; then
3268
		$rm conftest
3570
		$rm conftest
3269
		$LTCC -o conftest conftest.c $i
3571
		$LTCC $LTCFLAGS -o conftest conftest.c $i
3270
		# Did it work?
3572
		# Did it work?
3271
		if test "$?" -eq 0 ; then
3573
		if test "$?" -eq 0 ; then
3272
		  ldd_output=`ldd conftest`
3574
		  ldd_output=`ldd conftest`
Lines 3314-3320 Link Here
3314
	  set dummy $deplibs_check_method
3616
	  set dummy $deplibs_check_method
3315
	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3617
	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3316
	  for a_deplib in $deplibs; do
3618
	  for a_deplib in $deplibs; do
3317
	    name="`expr $a_deplib : '-l\(.*\)'`"
3619
	    name=`expr $a_deplib : '-l\(.*\)'`
3318
	    # If $name is empty we are operating on a -L argument.
3620
	    # If $name is empty we are operating on a -L argument.
3319
            if test "$name" != "" && test  "$name" != "0"; then
3621
            if test "$name" != "" && test  "$name" != "0"; then
3320
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3622
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
Lines 3383-3389 Link Here
3383
	  set dummy $deplibs_check_method
3685
	  set dummy $deplibs_check_method
3384
	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3686
	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3385
	  for a_deplib in $deplibs; do
3687
	  for a_deplib in $deplibs; do
3386
	    name="`expr $a_deplib : '-l\(.*\)'`"
3688
	    name=`expr $a_deplib : '-l\(.*\)'`
3387
	    # If $name is empty we are operating on a -L argument.
3689
	    # If $name is empty we are operating on a -L argument.
3388
	    if test -n "$name" && test "$name" != "0"; then
3690
	    if test -n "$name" && test "$name" != "0"; then
3389
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3691
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
Lines 3463-3469 Link Here
3463
	case $host in
3765
	case $host in
3464
	*-*-rhapsody* | *-*-darwin1.[012])
3766
	*-*-rhapsody* | *-*-darwin1.[012])
3465
	  # On Rhapsody replace the C library is the System framework
3767
	  # On Rhapsody replace the C library is the System framework
3466
	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
3768
	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3467
	  ;;
3769
	  ;;
3468
	esac
3770
	esac
3469
3771
Lines 3509-3525 Link Here
3509
	    fi
3811
	    fi
3510
	  fi
3812
	  fi
3511
	fi
3813
	fi
3512
	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
3513
	case $host in
3514
	  *-*-darwin*)
3515
	    newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
3516
	    dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
3517
	    ;;
3518
	esac
3519
	# Done checking deplibs!
3814
	# Done checking deplibs!
3520
	deplibs=$newdeplibs
3815
	deplibs=$newdeplibs
3521
      fi
3816
      fi
3522
3817
3818
3819
      # move library search paths that coincide with paths to not yet
3820
      # installed libraries to the beginning of the library search list
3821
      new_libs=
3822
      for path in $notinst_path; do
3823
	case " $new_libs " in
3824
	*" -L$path/$objdir "*) ;;
3825
	*)
3826
	  case " $deplibs " in
3827
	  *" -L$path/$objdir "*)
3828
	    new_libs="$new_libs -L$path/$objdir" ;;
3829
	  esac
3830
	  ;;
3831
	esac
3832
      done
3833
      for deplib in $deplibs; do
3834
	case $deplib in
3835
	-L*)
3836
	  case " $new_libs " in
3837
	  *" $deplib "*) ;;
3838
	  *) new_libs="$new_libs $deplib" ;;
3839
	  esac
3840
	  ;;
3841
	*) new_libs="$new_libs $deplib" ;;
3842
	esac
3843
      done
3844
      deplibs="$new_libs"
3845
3846
3523
      # All the library-specific variables (install_libdir is set above).
3847
      # All the library-specific variables (install_libdir is set above).
3524
      library_names=
3848
      library_names=
3525
      old_library=
3849
      old_library=
Lines 3532-3538 Link Here
3532
	  hardcode_libdirs=
3856
	  hardcode_libdirs=
3533
	  dep_rpath=
3857
	  dep_rpath=
3534
	  rpath="$finalize_rpath"
3858
	  rpath="$finalize_rpath"
3535
	  test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath"
3859
	  test "$mode" != relink && rpath="$compile_rpath$rpath"
3536
	  for libdir in $rpath; do
3860
	  for libdir in $rpath; do
3537
	    if test -n "$hardcode_libdir_flag_spec"; then
3861
	    if test -n "$hardcode_libdir_flag_spec"; then
3538
	      if test -n "$hardcode_libdir_separator"; then
3862
	      if test -n "$hardcode_libdir_separator"; then
Lines 3587-3593 Link Here
3587
	fi
3911
	fi
3588
3912
3589
	# Get the real and link names of the library.
3913
	# Get the real and link names of the library.
3590
	eval shared_ext=\"$shrext\"
3914
	eval shared_ext=\"$shrext_cmds\"
3591
	eval library_names=\"$library_names_spec\"
3915
	eval library_names=\"$library_names_spec\"
3592
	set dummy $library_names
3916
	set dummy $library_names
3593
	realname="$2"
3917
	realname="$2"
Lines 3603-3608 Link Here
3603
	fi
3927
	fi
3604
3928
3605
	lib="$output_objdir/$realname"
3929
	lib="$output_objdir/$realname"
3930
	linknames=
3606
	for link
3931
	for link
3607
	do
3932
	do
3608
	  linknames="$linknames $link"
3933
	  linknames="$linknames $link"
Lines 3617-3626 Link Here
3617
	    $show "generating symbol list for \`$libname.la'"
3942
	    $show "generating symbol list for \`$libname.la'"
3618
	    export_symbols="$output_objdir/$libname.exp"
3943
	    export_symbols="$output_objdir/$libname.exp"
3619
	    $run $rm $export_symbols
3944
	    $run $rm $export_symbols
3620
	    eval cmds=\"$export_symbols_cmds\"
3945
	    cmds=$export_symbols_cmds
3621
	    save_ifs="$IFS"; IFS='~'
3946
	    save_ifs="$IFS"; IFS='~'
3622
	    for cmd in $cmds; do
3947
	    for cmd in $cmds; do
3623
	      IFS="$save_ifs"
3948
	      IFS="$save_ifs"
3949
	      eval cmd=\"$cmd\"
3624
	      if len=`expr "X$cmd" : ".*"` &&
3950
	      if len=`expr "X$cmd" : ".*"` &&
3625
	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3951
	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3626
	        $show "$cmd"
3952
	        $show "$cmd"
Lines 3630-3635 Link Here
3630
	        # The command line is too long to execute in one step.
3956
	        # The command line is too long to execute in one step.
3631
	        $show "using reloadable object file for export list..."
3957
	        $show "using reloadable object file for export list..."
3632
	        skipped_export=:
3958
	        skipped_export=:
3959
		# Break out early, otherwise skipped_export may be
3960
		# set to false by a later but shorter cmd.
3961
		break
3633
	      fi
3962
	      fi
3634
	    done
3963
	    done
3635
	    IFS="$save_ifs"
3964
	    IFS="$save_ifs"
Lines 3650-3661 Link Here
3650
	for test_deplib in $deplibs; do
3979
	for test_deplib in $deplibs; do
3651
		case " $convenience " in
3980
		case " $convenience " in
3652
		*" $test_deplib "*) ;;
3981
		*" $test_deplib "*) ;;
3653
		*) 
3982
		*)
3654
			tmp_deplibs="$tmp_deplibs $test_deplib"
3983
			tmp_deplibs="$tmp_deplibs $test_deplib"
3655
			;;
3984
			;;
3656
		esac
3985
		esac
3657
	done
3986
	done
3658
	deplibs="$tmp_deplibs" 
3987
	deplibs="$tmp_deplibs"
3659
3988
3660
	if test -n "$convenience"; then
3989
	if test -n "$convenience"; then
3661
	  if test -n "$whole_archive_flag_spec"; then
3990
	  if test -n "$whole_archive_flag_spec"; then
Lines 3663-3729 Link Here
3663
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3992
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3664
	  else
3993
	  else
3665
	    gentop="$output_objdir/${outputname}x"
3994
	    gentop="$output_objdir/${outputname}x"
3666
	    $show "${rm}r $gentop"
3667
	    $run ${rm}r "$gentop"
3668
	    $show "$mkdir $gentop"
3669
	    $run $mkdir "$gentop"
3670
	    status=$?
3671
	    if test "$status" -ne 0 && test ! -d "$gentop"; then
3672
	      exit $status
3673
	    fi
3674
	    generated="$generated $gentop"
3995
	    generated="$generated $gentop"
3675
3996
3676
	    for xlib in $convenience; do
3997
	    func_extract_archives $gentop $convenience
3677
	      # Extract the objects.
3998
	    libobjs="$libobjs $func_extract_archives_result"
3678
	      case $xlib in
3679
	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3680
	      *) xabs=`pwd`"/$xlib" ;;
3681
	      esac
3682
	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3683
	      xdir="$gentop/$xlib"
3684
3685
	      $show "${rm}r $xdir"
3686
	      $run ${rm}r "$xdir"
3687
	      $show "$mkdir $xdir"
3688
	      $run $mkdir "$xdir"
3689
	      status=$?
3690
	      if test "$status" -ne 0 && test ! -d "$xdir"; then
3691
		exit $status
3692
	      fi
3693
	      # We will extract separately just the conflicting names and we will no
3694
	      # longer touch any unique names. It is faster to leave these extract
3695
	      # automatically by $AR in one run.
3696
	      $show "(cd $xdir && $AR x $xabs)"
3697
	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3698
	      if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
3699
		:
3700
	      else
3701
		$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
3702
		$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
3703
		$AR t "$xabs" | sort | uniq -cd | while read -r count name
3704
		do
3705
		  i=1
3706
		  while test "$i" -le "$count"
3707
		  do
3708
		   # Put our $i before any first dot (extension)
3709
		   # Never overwrite any file
3710
		   name_to="$name"
3711
		   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
3712
		   do
3713
		     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
3714
		   done
3715
		   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
3716
		   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
3717
		   i=`expr $i + 1`
3718
		  done
3719
		done
3720
	      fi
3721
3722
	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3723
	    done
3724
	  fi
3999
	  fi
3725
	fi
4000
	fi
3726
4001
	
3727
	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4002
	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3728
	  eval flag=\"$thread_safe_flag_spec\"
4003
	  eval flag=\"$thread_safe_flag_spec\"
3729
	  linker_flags="$linker_flags $flag"
4004
	  linker_flags="$linker_flags $flag"
Lines 3734-3764 Link Here
3734
	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4009
	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
3735
	fi
4010
	fi
3736
4011
3737
	# Add all flags from the command line.  We here create a library,
3738
	# but those flags were only added to compile_command and
3739
	# finalize_command, which are only used when creating executables.
3740
	# So do it by hand here.
3741
	compiler_flags="$compiler_flags $add_flags"
3742
	# Only add it to commands which use CC, instead of LD, i.e.
3743
	# only to $compiler_flags
3744
	#linker_flags="$linker_flags $add_flags"
3745
3746
	# Do each of the archive commands.
4012
	# Do each of the archive commands.
3747
	if test "$module" = yes && test -n "$module_cmds" ; then
4013
	if test "$module" = yes && test -n "$module_cmds" ; then
3748
	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4014
	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
3749
	    eval cmds=\"$module_expsym_cmds\"
4015
	    eval test_cmds=\"$module_expsym_cmds\"
4016
	    cmds=$module_expsym_cmds
3750
	  else
4017
	  else
3751
	    eval cmds=\"$module_cmds\"
4018
	    eval test_cmds=\"$module_cmds\"
4019
	    cmds=$module_cmds
3752
	  fi
4020
	  fi
3753
	else
4021
	else
3754
	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4022
	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3755
	  eval cmds=\"$archive_expsym_cmds\"
4023
	  eval test_cmds=\"$archive_expsym_cmds\"
4024
	  cmds=$archive_expsym_cmds
3756
	else
4025
	else
3757
	  eval cmds=\"$archive_cmds\"
4026
	  eval test_cmds=\"$archive_cmds\"
4027
	  cmds=$archive_cmds
3758
	  fi
4028
	  fi
3759
	fi
4029
	fi
3760
4030
3761
	if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
4031
	if test "X$skipped_export" != "X:" &&
4032
	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
3762
	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4033
	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3763
	  :
4034
	  :
3764
	else
4035
	else
Lines 3777-3782 Link Here
3777
	    save_libobjs=$libobjs
4048
	    save_libobjs=$libobjs
3778
	  fi
4049
	  fi
3779
	  save_output=$output
4050
	  save_output=$output
4051
	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
3780
4052
3781
	  # Clear the reloadable object creation command queue and
4053
	  # Clear the reloadable object creation command queue and
3782
	  # initialize k to one.
4054
	  # initialize k to one.
Lines 3786-3798 Link Here
3786
	  delfiles=
4058
	  delfiles=
3787
	  last_robj=
4059
	  last_robj=
3788
	  k=1
4060
	  k=1
3789
	  output=$output_objdir/$save_output-${k}.$objext
4061
	  output=$output_objdir/$output_la-${k}.$objext
3790
	  # Loop over the list of objects to be linked.
4062
	  # Loop over the list of objects to be linked.
3791
	  for obj in $save_libobjs
4063
	  for obj in $save_libobjs
3792
	  do
4064
	  do
3793
	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4065
	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3794
	    if test "X$objlist" = X ||
4066
	    if test "X$objlist" = X ||
3795
	       { len=`expr "X$test_cmds" : ".*"` &&
4067
	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
3796
		 test "$len" -le "$max_cmd_len"; }; then
4068
		 test "$len" -le "$max_cmd_len"; }; then
3797
	      objlist="$objlist $obj"
4069
	      objlist="$objlist $obj"
3798
	    else
4070
	    else
Lines 3806-3814 Link Here
3806
		# the last one created.
4078
		# the last one created.
3807
		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4079
		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3808
	      fi
4080
	      fi
3809
	      last_robj=$output_objdir/$save_output-${k}.$objext
4081
	      last_robj=$output_objdir/$output_la-${k}.$objext
3810
	      k=`expr $k + 1`
4082
	      k=`expr $k + 1`
3811
	      output=$output_objdir/$save_output-${k}.$objext
4083
	      output=$output_objdir/$output_la-${k}.$objext
3812
	      objlist=$obj
4084
	      objlist=$obj
3813
	      len=1
4085
	      len=1
3814
	    fi
4086
	    fi
Lines 3828-3840 Link Here
3828
	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4100
	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3829
          fi
4101
          fi
3830
4102
3831
	  # Set up a command to remove the reloadale object files
4103
	  # Set up a command to remove the reloadable object files
3832
	  # after they are used.
4104
	  # after they are used.
3833
	  i=0
4105
	  i=0
3834
	  while test "$i" -lt "$k"
4106
	  while test "$i" -lt "$k"
3835
	  do
4107
	  do
3836
	    i=`expr $i + 1`
4108
	    i=`expr $i + 1`
3837
	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
4109
	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
3838
	  done
4110
	  done
3839
4111
3840
	  $echo "creating a temporary reloadable object file: $output"
4112
	  $echo "creating a temporary reloadable object file: $output"
Lines 3859-3886 Link Here
3859
	  # value of $libobjs for piecewise linking.
4131
	  # value of $libobjs for piecewise linking.
3860
4132
3861
	  # Do each of the archive commands.
4133
	  # Do each of the archive commands.
4134
	  if test "$module" = yes && test -n "$module_cmds" ; then
4135
	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4136
	      cmds=$module_expsym_cmds
4137
	    else
4138
	      cmds=$module_cmds
4139
	    fi
4140
	  else
3862
	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4141
	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3863
	    eval cmds=\"$archive_expsym_cmds\"
4142
	    cmds=$archive_expsym_cmds
3864
	  else
4143
	  else
3865
	    eval cmds=\"$archive_cmds\"
4144
	    cmds=$archive_cmds
4145
	    fi
3866
	  fi
4146
	  fi
3867
4147
3868
	  # Append the command to remove the reloadable object files
4148
	  # Append the command to remove the reloadable object files
3869
	  # to the just-reset $cmds.
4149
	  # to the just-reset $cmds.
3870
	  eval cmds=\"\$cmds~$rm $delfiles\"
4150
	  eval cmds=\"\$cmds~\$rm $delfiles\"
3871
	fi
4151
	fi
3872
	save_ifs="$IFS"; IFS='~'
4152
	save_ifs="$IFS"; IFS='~'
3873
	for cmd in $cmds; do
4153
	for cmd in $cmds; do
3874
	  IFS="$save_ifs"
4154
	  IFS="$save_ifs"
4155
	  eval cmd=\"$cmd\"
3875
	  $show "$cmd"
4156
	  $show "$cmd"
3876
	  $run eval "$cmd" || exit $?
4157
	  $run eval "$cmd" || {
4158
	    lt_exit=$?
4159
4160
	    # Restore the uninstalled library and exit
4161
	    if test "$mode" = relink; then
4162
	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4163
	    fi
4164
4165
	    exit $lt_exit
4166
	  }
3877
	done
4167
	done
3878
	IFS="$save_ifs"
4168
	IFS="$save_ifs"
3879
4169
3880
	# Restore the uninstalled library and exit
4170
	# Restore the uninstalled library and exit
3881
	if test "$mode" = relink; then
4171
	if test "$mode" = relink; then
3882
	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4172
	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
3883
	  exit 0
4173
4174
	  if test -n "$convenience"; then
4175
	    if test -z "$whole_archive_flag_spec"; then
4176
	      $show "${rm}r $gentop"
4177
	      $run ${rm}r "$gentop"
4178
	    fi
4179
	  fi
4180
4181
	  exit $EXIT_SUCCESS
3884
	fi
4182
	fi
3885
4183
3886
	# Create links to the real library.
4184
	# Create links to the real library.
Lines 3928-3934 Link Here
3928
      *.lo)
4226
      *.lo)
3929
	if test -n "$objs$old_deplibs"; then
4227
	if test -n "$objs$old_deplibs"; then
3930
	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4228
	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3931
	  exit 1
4229
	  exit $EXIT_FAILURE
3932
	fi
4230
	fi
3933
	libobj="$output"
4231
	libobj="$output"
3934
	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4232
	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
Lines 3957-4020 Link Here
3957
	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4255
	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3958
	else
4256
	else
3959
	  gentop="$output_objdir/${obj}x"
4257
	  gentop="$output_objdir/${obj}x"
3960
	  $show "${rm}r $gentop"
3961
	  $run ${rm}r "$gentop"
3962
	  $show "$mkdir $gentop"
3963
	  $run $mkdir "$gentop"
3964
	  status=$?
3965
	  if test "$status" -ne 0 && test ! -d "$gentop"; then
3966
	    exit $status
3967
	  fi
3968
	  generated="$generated $gentop"
4258
	  generated="$generated $gentop"
3969
4259
3970
	  for xlib in $convenience; do
4260
	  func_extract_archives $gentop $convenience
3971
	    # Extract the objects.
4261
	  reload_conv_objs="$reload_objs $func_extract_archives_result"
3972
	    case $xlib in
3973
	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3974
	    *) xabs=`pwd`"/$xlib" ;;
3975
	    esac
3976
	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3977
	    xdir="$gentop/$xlib"
3978
3979
	    $show "${rm}r $xdir"
3980
	    $run ${rm}r "$xdir"
3981
	    $show "$mkdir $xdir"
3982
	    $run $mkdir "$xdir"
3983
	    status=$?
3984
	    if test "$status" -ne 0 && test ! -d "$xdir"; then
3985
	      exit $status
3986
	    fi
3987
	    # We will extract separately just the conflicting names and we will no
3988
	    # longer touch any unique names. It is faster to leave these extract
3989
	    # automatically by $AR in one run.
3990
	    $show "(cd $xdir && $AR x $xabs)"
3991
	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3992
	    if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
3993
	      :
3994
	    else
3995
	      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
3996
	      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
3997
	      $AR t "$xabs" | sort | uniq -cd | while read -r count name
3998
	      do
3999
		i=1
4000
		while test "$i" -le "$count"
4001
		do
4002
		 # Put our $i before any first dot (extension)
4003
		 # Never overwrite any file
4004
		 name_to="$name"
4005
		 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4006
		 do
4007
		   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4008
		 done
4009
		 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4010
		 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4011
		 i=`expr $i + 1`
4012
		done
4013
	      done
4014
	    fi
4015
4016
	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4017
	  done
4018
	fi
4262
	fi
4019
      fi
4263
      fi
4020
4264
Lines 4022-4031 Link Here
4022
      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4266
      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4023
4267
4024
      output="$obj"
4268
      output="$obj"
4025
      eval cmds=\"$reload_cmds\"
4269
      cmds=$reload_cmds
4026
      save_ifs="$IFS"; IFS='~'
4270
      save_ifs="$IFS"; IFS='~'
4027
      for cmd in $cmds; do
4271
      for cmd in $cmds; do
4028
	IFS="$save_ifs"
4272
	IFS="$save_ifs"
4273
	eval cmd=\"$cmd\"
4029
	$show "$cmd"
4274
	$show "$cmd"
4030
	$run eval "$cmd" || exit $?
4275
	$run eval "$cmd" || exit $?
4031
      done
4276
      done
Lines 4038-4044 Link Here
4038
	  $run ${rm}r $gentop
4283
	  $run ${rm}r $gentop
4039
	fi
4284
	fi
4040
4285
4041
	exit 0
4286
	exit $EXIT_SUCCESS
4042
      fi
4287
      fi
4043
4288
4044
      if test "$build_libtool_libs" != yes; then
4289
      if test "$build_libtool_libs" != yes; then
Lines 4051-4067 Link Here
4051
	# accidentally link it into a program.
4296
	# accidentally link it into a program.
4052
	# $show "echo timestamp > $libobj"
4297
	# $show "echo timestamp > $libobj"
4053
	# $run eval "echo timestamp > $libobj" || exit $?
4298
	# $run eval "echo timestamp > $libobj" || exit $?
4054
	exit 0
4299
	exit $EXIT_SUCCESS
4055
      fi
4300
      fi
4056
4301
4057
      if test -n "$pic_flag" || test "$pic_mode" != default; then
4302
      if test -n "$pic_flag" || test "$pic_mode" != default; then
4058
	# Only do commands if we really have different PIC objects.
4303
	# Only do commands if we really have different PIC objects.
4059
	reload_objs="$libobjs $reload_conv_objs"
4304
	reload_objs="$libobjs $reload_conv_objs"
4060
	output="$libobj"
4305
	output="$libobj"
4061
	eval cmds=\"$reload_cmds\"
4306
	cmds=$reload_cmds
4062
	save_ifs="$IFS"; IFS='~'
4307
	save_ifs="$IFS"; IFS='~'
4063
	for cmd in $cmds; do
4308
	for cmd in $cmds; do
4064
	  IFS="$save_ifs"
4309
	  IFS="$save_ifs"
4310
	  eval cmd=\"$cmd\"
4065
	  $show "$cmd"
4311
	  $show "$cmd"
4066
	  $run eval "$cmd" || exit $?
4312
	  $run eval "$cmd" || exit $?
4067
	done
4313
	done
Lines 4073-4079 Link Here
4073
	$run ${rm}r $gentop
4319
	$run ${rm}r $gentop
4074
      fi
4320
      fi
4075
4321
4076
      exit 0
4322
      exit $EXIT_SUCCESS
4077
      ;;
4323
      ;;
4078
4324
4079
    prog)
4325
    prog)
Lines 4098-4121 Link Here
4098
      case $host in
4344
      case $host in
4099
      *-*-rhapsody* | *-*-darwin1.[012])
4345
      *-*-rhapsody* | *-*-darwin1.[012])
4100
	# On Rhapsody replace the C library is the System framework
4346
	# On Rhapsody replace the C library is the System framework
4101
	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
4347
	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4102
	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
4348
	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4103
	;;
4349
	;;
4104
      esac
4350
      esac
4105
4351
4106
      case $host in
4352
      case $host in
4107
      *-*-darwin*)
4353
      *darwin*)
4108
        # Don't allow lazy linking, it breaks C++ global constructors
4354
        # Don't allow lazy linking, it breaks C++ global constructors
4109
        if test "$tagname" = CXX ; then
4355
        if test "$tagname" = CXX ; then
4110
        compile_command="$compile_command ${wl}-bind_at_load"
4356
        compile_command="$compile_command ${wl}-bind_at_load"
4111
        finalize_command="$finalize_command ${wl}-bind_at_load"
4357
        finalize_command="$finalize_command ${wl}-bind_at_load"
4112
        fi
4358
        fi
4113
	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
4114
	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
4115
	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
4116
        ;;
4359
        ;;
4117
      esac
4360
      esac
4118
4361
4362
4363
      # move library search paths that coincide with paths to not yet
4364
      # installed libraries to the beginning of the library search list
4365
      new_libs=
4366
      for path in $notinst_path; do
4367
	case " $new_libs " in
4368
	*" -L$path/$objdir "*) ;;
4369
	*)
4370
	  case " $compile_deplibs " in
4371
	  *" -L$path/$objdir "*)
4372
	    new_libs="$new_libs -L$path/$objdir" ;;
4373
	  esac
4374
	  ;;
4375
	esac
4376
      done
4377
      for deplib in $compile_deplibs; do
4378
	case $deplib in
4379
	-L*)
4380
	  case " $new_libs " in
4381
	  *" $deplib "*) ;;
4382
	  *) new_libs="$new_libs $deplib" ;;
4383
	  esac
4384
	  ;;
4385
	*) new_libs="$new_libs $deplib" ;;
4386
	esac
4387
      done
4388
      compile_deplibs="$new_libs"
4389
4390
4119
      compile_command="$compile_command $compile_deplibs"
4391
      compile_command="$compile_command $compile_deplibs"
4120
      finalize_command="$finalize_command $finalize_deplibs"
4392
      finalize_command="$finalize_command $finalize_deplibs"
4121
4393
Lines 4160-4169 Link Here
4160
	fi
4432
	fi
4161
	case $host in
4433
	case $host in
4162
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4434
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4435
	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4163
	  case :$dllsearchpath: in
4436
	  case :$dllsearchpath: in
4164
	  *":$libdir:"*) ;;
4437
	  *":$libdir:"*) ;;
4165
	  *) dllsearchpath="$dllsearchpath:$libdir";;
4438
	  *) dllsearchpath="$dllsearchpath:$libdir";;
4166
	  esac
4439
	  esac
4440
	  case :$dllsearchpath: in
4441
	  *":$testbindir:"*) ;;
4442
	  *) dllsearchpath="$dllsearchpath:$testbindir";;
4443
	  esac
4167
	  ;;
4444
	  ;;
4168
	esac
4445
	esac
4169
      done
4446
      done
Lines 4277-4289 Link Here
4277
4554
4278
	    # Prepare the list of exported symbols
4555
	    # Prepare the list of exported symbols
4279
	    if test -z "$export_symbols"; then
4556
	    if test -z "$export_symbols"; then
4280
	      export_symbols="$output_objdir/$output.exp"
4557
	      export_symbols="$output_objdir/$outputname.exp"
4281
	      $run $rm $export_symbols
4558
	      $run $rm $export_symbols
4282
	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4559
	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4560
              case $host in
4561
              *cygwin* | *mingw* )
4562
	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4563
		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4564
                ;;
4565
              esac
4283
	    else
4566
	    else
4284
	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4567
	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4285
	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4568
	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4286
	      $run eval 'mv "$nlist"T "$nlist"'
4569
	      $run eval 'mv "$nlist"T "$nlist"'
4570
              case $host in
4571
              *cygwin* | *mingw* )
4572
	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4573
		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4574
                ;;
4575
              esac
4287
	    fi
4576
	    fi
4288
	  fi
4577
	  fi
4289
4578
Lines 4334-4340 Link Here
4334
#endif
4623
#endif
4335
4624
4336
/* The mapping between symbol names and symbols. */
4625
/* The mapping between symbol names and symbols. */
4626
"
4627
4628
	    case $host in
4629
	    *cygwin* | *mingw* )
4630
	  $echo >> "$output_objdir/$dlsyms" "\
4631
/* DATA imports from DLLs on WIN32 can't be const, because
4632
   runtime relocations are performed -- see ld's documentation
4633
   on pseudo-relocs */
4634
struct {
4635
"
4636
	      ;;
4637
	    * )
4638
	  $echo >> "$output_objdir/$dlsyms" "\
4337
const struct {
4639
const struct {
4640
"
4641
	      ;;
4642
	    esac
4643
4644
4645
	  $echo >> "$output_objdir/$dlsyms" "\
4338
  const char *name;
4646
  const char *name;
4339
  lt_ptr address;
4647
  lt_ptr address;
4340
}
4648
}
Lines 4381-4400 Link Here
4381
	  esac
4689
	  esac
4382
4690
4383
	  # Now compile the dynamic symbol file.
4691
	  # Now compile the dynamic symbol file.
4384
	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4692
	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4385
	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4693
	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4386
4694
4387
	  # Clean up the generated files.
4695
	  # Clean up the generated files.
4388
	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4696
	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4389
	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4697
	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4390
4698
4391
	  # Transform the symbol file into the correct name.
4699
	  # Transform the symbol file into the correct name.
4392
	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4700
          case $host in
4393
	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4701
          *cygwin* | *mingw* )
4702
            if test -f "$output_objdir/${outputname}.def" ; then
4703
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4704
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4705
            else
4706
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4707
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4708
             fi
4709
            ;;
4710
          * )
4711
            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4712
            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4713
            ;;
4714
          esac
4394
	  ;;
4715
	  ;;
4395
	*)
4716
	*)
4396
	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4717
	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4397
	  exit 1
4718
	  exit $EXIT_FAILURE
4398
	  ;;
4719
	  ;;
4399
	esac
4720
	esac
4400
      else
4721
      else
Lines 4407-4423 Link Here
4407
	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4728
	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4408
      fi
4729
      fi
4409
4730
4410
      # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
4411
      # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
4412
      # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
4413
      # This does not apply on AIX for ia64, which uses a SysV linker.
4414
      case "$host" in
4415
        ia64-*-aix5*) ;;
4416
        *-*-aix4* | *-*-aix5*)
4417
                   compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
4418
                   finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
4419
      esac
4420
4421
      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4731
      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4422
	# Replace the output file specification.
4732
	# Replace the output file specification.
4423
	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4733
	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
Lines 4426-4432 Link Here
4426
	# We have no uninstalled library dependencies, so finalize right now.
4736
	# We have no uninstalled library dependencies, so finalize right now.
4427
	$show "$link_command"
4737
	$show "$link_command"
4428
	$run eval "$link_command"
4738
	$run eval "$link_command"
4429
	status=$?
4739
	exit_status=$?
4430
4740
4431
	# Delete the generated files.
4741
	# Delete the generated files.
4432
	if test -n "$dlsyms"; then
4742
	if test -n "$dlsyms"; then
Lines 4434-4440 Link Here
4434
	  $run $rm "$output_objdir/${outputname}S.${objext}"
4744
	  $run $rm "$output_objdir/${outputname}S.${objext}"
4435
	fi
4745
	fi
4436
4746
4437
	exit $status
4747
	exit $exit_status
4438
      fi
4748
      fi
4439
4749
4440
      if test -n "$shlibpath_var"; then
4750
      if test -n "$shlibpath_var"; then
Lines 4493-4499 Link Here
4493
	# Link the executable and exit
4803
	# Link the executable and exit
4494
	$show "$link_command"
4804
	$show "$link_command"
4495
	$run eval "$link_command" || exit $?
4805
	$run eval "$link_command" || exit $?
4496
	exit 0
4806
	exit $EXIT_SUCCESS
4497
      fi
4807
      fi
4498
4808
4499
      if test "$hardcode_action" = relink; then
4809
      if test "$hardcode_action" = relink; then
Lines 4548-4557 Link Here
4548
      fi
4858
      fi
4549
4859
4550
      # Quote $echo for shipping.
4860
      # Quote $echo for shipping.
4551
      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
4861
      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4552
	case $0 in
4862
	case $progpath in
4553
	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
4863
	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4554
	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
4864
	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4555
	esac
4865
	esac
4556
	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4866
	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4557
      else
4867
      else
Lines 4573-4583 Link Here
4573
	  *) exeext= ;;
4883
	  *) exeext= ;;
4574
	esac
4884
	esac
4575
	case $host in
4885
	case $host in
4576
	  *mingw* )
4886
	  *cygwin* | *mingw* )
4577
	    cwrappersource=`$echo ${output_objdir}/lt-${outputname}.c`
4887
            output_name=`basename $output`
4578
	    cwrapper=`$echo ${output}.exe`
4888
            output_path=`dirname $output`
4579
	    $rm $cwrappersource $cwrapper
4889
            cwrappersource="$output_path/$objdir/lt-$output_name.c"
4580
	    trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
4890
            cwrapper="$output_path/$output_name.exe"
4891
            $rm $cwrappersource $cwrapper
4892
            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4581
4893
4582
	    cat > $cwrappersource <<EOF
4894
	    cat > $cwrappersource <<EOF
4583
4895
Lines 4586-4592 Link Here
4586
4898
4587
   The $output program cannot be directly executed until all the libtool
4899
   The $output program cannot be directly executed until all the libtool
4588
   libraries that it depends on are installed.
4900
   libraries that it depends on are installed.
4589
   
4901
4590
   This wrapper executable should never be moved out of the build directory.
4902
   This wrapper executable should never be moved out of the build directory.
4591
   If it is, it will not operate correctly.
4903
   If it is, it will not operate correctly.
4592
4904
Lines 4602-4607 Link Here
4602
#include <malloc.h>
4914
#include <malloc.h>
4603
#include <stdarg.h>
4915
#include <stdarg.h>
4604
#include <assert.h>
4916
#include <assert.h>
4917
#include <string.h>
4918
#include <ctype.h>
4919
#include <sys/stat.h>
4605
4920
4606
#if defined(PATH_MAX)
4921
#if defined(PATH_MAX)
4607
# define LT_PATHMAX PATH_MAX
4922
# define LT_PATHMAX PATH_MAX
Lines 4612-4626 Link Here
4612
#endif
4927
#endif
4613
4928
4614
#ifndef DIR_SEPARATOR
4929
#ifndef DIR_SEPARATOR
4615
#define DIR_SEPARATOR '/'
4930
# define DIR_SEPARATOR '/'
4931
# define PATH_SEPARATOR ':'
4616
#endif
4932
#endif
4617
4933
4618
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4934
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4619
  defined (__OS2__)
4935
  defined (__OS2__)
4620
#define HAVE_DOS_BASED_FILE_SYSTEM
4936
# define HAVE_DOS_BASED_FILE_SYSTEM
4621
#ifndef DIR_SEPARATOR_2 
4937
# ifndef DIR_SEPARATOR_2
4622
#define DIR_SEPARATOR_2 '\\'
4938
#  define DIR_SEPARATOR_2 '\\'
4623
#endif
4939
# endif
4940
# ifndef PATH_SEPARATOR_2
4941
#  define PATH_SEPARATOR_2 ';'
4942
# endif
4624
#endif
4943
#endif
4625
4944
4626
#ifndef DIR_SEPARATOR_2
4945
#ifndef DIR_SEPARATOR_2
Lines 4630-4646 Link Here
4630
        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4949
        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4631
#endif /* DIR_SEPARATOR_2 */
4950
#endif /* DIR_SEPARATOR_2 */
4632
4951
4952
#ifndef PATH_SEPARATOR_2
4953
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4954
#else /* PATH_SEPARATOR_2 */
4955
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4956
#endif /* PATH_SEPARATOR_2 */
4957
4633
#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
4958
#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
4634
#define XFREE(stale) do { \
4959
#define XFREE(stale) do { \
4635
  if (stale) { free ((void *) stale); stale = 0; } \
4960
  if (stale) { free ((void *) stale); stale = 0; } \
4636
} while (0)
4961
} while (0)
4637
4962
4963
/* -DDEBUG is fairly common in CFLAGS.  */
4964
#undef DEBUG
4965
#if defined DEBUGWRAPPER
4966
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
4967
#else
4968
# define DEBUG(format, ...)
4969
#endif
4970
4638
const char *program_name = NULL;
4971
const char *program_name = NULL;
4639
4972
4640
void * xmalloc (size_t num);
4973
void * xmalloc (size_t num);
4641
char * xstrdup (const char *string);
4974
char * xstrdup (const char *string);
4642
char * basename (const char *name);
4975
const char * base_name (const char *name);
4643
char * fnqualify(const char *path);
4976
char * find_executable(const char *wrapper);
4977
int    check_executable(const char *path);
4644
char * strendzap(char *str, const char *pat);
4978
char * strendzap(char *str, const char *pat);
4645
void lt_fatal (const char *message, ...);
4979
void lt_fatal (const char *message, ...);
4646
4980
Lines 4649-4678 Link Here
4649
{
4983
{
4650
  char **newargz;
4984
  char **newargz;
4651
  int i;
4985
  int i;
4652
  
4986
4653
  program_name = (char *) xstrdup ((char *) basename (argv[0]));
4987
  program_name = (char *) xstrdup (base_name (argv[0]));
4988
  DEBUG("(main) argv[0]      : %s\n",argv[0]);
4989
  DEBUG("(main) program_name : %s\n",program_name);
4654
  newargz = XMALLOC(char *, argc+2);
4990
  newargz = XMALLOC(char *, argc+2);
4655
EOF
4991
EOF
4656
4992
4657
	    cat >> $cwrappersource <<EOF
4993
            cat >> $cwrappersource <<EOF
4658
  newargz[0] = "$SHELL";
4994
  newargz[0] = (char *) xstrdup("$SHELL");
4659
EOF
4995
EOF
4660
4996
4661
	    cat >> $cwrappersource <<"EOF"
4997
            cat >> $cwrappersource <<"EOF"
4662
  newargz[1] = fnqualify(argv[0]);
4998
  newargz[1] = find_executable(argv[0]);
4999
  if (newargz[1] == NULL)
5000
    lt_fatal("Couldn't find %s", argv[0]);
5001
  DEBUG("(main) found exe at : %s\n",newargz[1]);
4663
  /* we know the script has the same name, without the .exe */
5002
  /* we know the script has the same name, without the .exe */
4664
  /* so make sure newargz[1] doesn't end in .exe */
5003
  /* so make sure newargz[1] doesn't end in .exe */
4665
  strendzap(newargz[1],".exe"); 
5004
  strendzap(newargz[1],".exe");
4666
  for (i = 1; i < argc; i++)
5005
  for (i = 1; i < argc; i++)
4667
    newargz[i+1] = xstrdup(argv[i]);
5006
    newargz[i+1] = xstrdup(argv[i]);
4668
  newargz[argc+1] = NULL;
5007
  newargz[argc+1] = NULL;
5008
5009
  for (i=0; i<argc+1; i++)
5010
  {
5011
    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
5012
    ;
5013
  }
5014
4669
EOF
5015
EOF
4670
5016
4671
	    cat >> $cwrappersource <<EOF
5017
            case $host_os in
5018
              mingw*)
5019
                cat >> $cwrappersource <<EOF
5020
  execv("$SHELL",(char const **)newargz);
5021
EOF
5022
              ;;
5023
              *)
5024
                cat >> $cwrappersource <<EOF
4672
  execv("$SHELL",newargz);
5025
  execv("$SHELL",newargz);
4673
EOF
5026
EOF
5027
              ;;
5028
            esac
4674
5029
4675
	    cat >> $cwrappersource <<"EOF"
5030
            cat >> $cwrappersource <<"EOF"
5031
  return 127;
4676
}
5032
}
4677
5033
4678
void *
5034
void *
Lines 4685-4743 Link Here
4685
  return p;
5041
  return p;
4686
}
5042
}
4687
5043
4688
char * 
5044
char *
4689
xstrdup (const char *string)
5045
xstrdup (const char *string)
4690
{
5046
{
4691
  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5047
  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
4692
;
5048
;
4693
}
5049
}
4694
5050
4695
char *
5051
const char *
4696
basename (const char *name)
5052
base_name (const char *name)
4697
{
5053
{
4698
  const char *base;
5054
  const char *base;
4699
5055
4700
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5056
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4701
  /* Skip over the disk name in MSDOS pathnames. */
5057
  /* Skip over the disk name in MSDOS pathnames. */
4702
  if (isalpha (name[0]) && name[1] == ':') 
5058
  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
4703
    name += 2;
5059
    name += 2;
4704
#endif
5060
#endif
4705
5061
4706
  for (base = name; *name; name++)
5062
  for (base = name; *name; name++)
4707
    if (IS_DIR_SEPARATOR (*name))
5063
    if (IS_DIR_SEPARATOR (*name))
4708
      base = name + 1;
5064
      base = name + 1;
4709
  return (char *) base;
5065
  return base;
4710
}
5066
}
4711
5067
4712
char * 
5068
int
4713
fnqualify(const char *path)
5069
check_executable(const char * path)
5070
{
5071
  struct stat st;
5072
5073
  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5074
  if ((!path) || (!*path))
5075
    return 0;
5076
5077
  if ((stat (path, &st) >= 0) &&
5078
      (
5079
        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5080
#if defined (S_IXOTH)
5081
       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5082
#endif
5083
#if defined (S_IXGRP)
5084
       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5085
#endif
5086
       ((st.st_mode & S_IXUSR) == S_IXUSR))
5087
      )
5088
    return 1;
5089
  else
5090
    return 0;
5091
}
5092
5093
/* Searches for the full path of the wrapper.  Returns
5094
   newly allocated full path name if found, NULL otherwise */
5095
char *
5096
find_executable (const char* wrapper)
4714
{
5097
{
4715
  size_t size;
5098
  int has_slash = 0;
4716
  char *p;
5099
  const char* p;
5100
  const char* p_next;
5101
  /* static buffer for getcwd */
4717
  char tmp[LT_PATHMAX + 1];
5102
  char tmp[LT_PATHMAX + 1];
5103
  int tmp_len;
5104
  char* concat_name;
5105
5106
  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
4718
5107
4719
  assert(path != NULL);
5108
  if ((wrapper == NULL) || (*wrapper == '\0'))
5109
    return NULL;
4720
5110
4721
  /* Is it qualified already? */
5111
  /* Absolute path? */
5112
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5113
  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5114
  {
5115
    concat_name = xstrdup (wrapper);
5116
    if (check_executable(concat_name))
5117
      return concat_name;
5118
    XFREE(concat_name);
5119
  }
5120
  else
5121
  {
5122
#endif
5123
    if (IS_DIR_SEPARATOR (wrapper[0]))
5124
    {
5125
      concat_name = xstrdup (wrapper);
5126
      if (check_executable(concat_name))
5127
        return concat_name;
5128
      XFREE(concat_name);
5129
    }
4722
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5130
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4723
  if (isalpha (path[0]) && path[1] == ':')
5131
  }
4724
    return xstrdup (path);
4725
#endif
5132
#endif
4726
  if (IS_DIR_SEPARATOR (path[0]))
4727
    return xstrdup (path);
4728
5133
4729
  /* prepend the current directory */
5134
  for (p = wrapper; *p; p++)
4730
  /* doesn't handle '~' */
5135
    if (*p == '/')
5136
    {
5137
      has_slash = 1;
5138
      break;
5139
    }
5140
  if (!has_slash)
5141
  {
5142
    /* no slashes; search PATH */
5143
    const char* path = getenv ("PATH");
5144
    if (path != NULL)
5145
    {
5146
      for (p = path; *p; p = p_next)
5147
      {
5148
        const char* q;
5149
        size_t p_len;
5150
        for (q = p; *q; q++)
5151
          if (IS_PATH_SEPARATOR(*q))
5152
            break;
5153
        p_len = q - p;
5154
        p_next = (*q == '\0' ? q : q + 1);
5155
        if (p_len == 0)
5156
        {
5157
          /* empty path: current directory */
5158
          if (getcwd (tmp, LT_PATHMAX) == NULL)
5159
            lt_fatal ("getcwd failed");
5160
          tmp_len = strlen(tmp);
5161
          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5162
          memcpy (concat_name, tmp, tmp_len);
5163
          concat_name[tmp_len] = '/';
5164
          strcpy (concat_name + tmp_len + 1, wrapper);
5165
        }
5166
        else
5167
        {
5168
          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5169
          memcpy (concat_name, p, p_len);
5170
          concat_name[p_len] = '/';
5171
          strcpy (concat_name + p_len + 1, wrapper);
5172
        }
5173
        if (check_executable(concat_name))
5174
          return concat_name;
5175
        XFREE(concat_name);
5176
      }
5177
    }
5178
    /* not found in PATH; assume curdir */
5179
  }
5180
  /* Relative path | not found in path: prepend cwd */
4731
  if (getcwd (tmp, LT_PATHMAX) == NULL)
5181
  if (getcwd (tmp, LT_PATHMAX) == NULL)
4732
    lt_fatal ("getcwd failed");
5182
    lt_fatal ("getcwd failed");
4733
  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
5183
  tmp_len = strlen(tmp);
4734
  p = XMALLOC(char, size);
5184
  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
4735
  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
5185
  memcpy (concat_name, tmp, tmp_len);
4736
  return p;
5186
  concat_name[tmp_len] = '/';
5187
  strcpy (concat_name + tmp_len + 1, wrapper);
5188
5189
  if (check_executable(concat_name))
5190
    return concat_name;
5191
  XFREE(concat_name);
5192
  return NULL;
4737
}
5193
}
4738
5194
4739
char *
5195
char *
4740
strendzap(char *str, const char *pat) 
5196
strendzap(char *str, const char *pat)
4741
{
5197
{
4742
  size_t len, patlen;
5198
  size_t len, patlen;
4743
5199
Lines 4757-4763 Link Here
4757
}
5213
}
4758
5214
4759
static void
5215
static void
4760
lt_error_core (int exit_status, const char * mode, 
5216
lt_error_core (int exit_status, const char * mode,
4761
          const char * message, va_list ap)
5217
          const char * message, va_list ap)
4762
{
5218
{
4763
  fprintf (stderr, "%s: %s: ", program_name, mode);
5219
  fprintf (stderr, "%s: %s: ", program_name, mode);
Lines 4777-4792 Link Here
4777
  va_end (ap);
5233
  va_end (ap);
4778
}
5234
}
4779
EOF
5235
EOF
4780
	  # we should really use a build-platform specific compiler
5236
          # we should really use a build-platform specific compiler
4781
	  # here, but OTOH, the wrappers (shell script and this C one)
5237
          # here, but OTOH, the wrappers (shell script and this C one)
4782
	  # are only useful if you want to execute the "real" binary.
5238
          # are only useful if you want to execute the "real" binary.
4783
	  # Since the "real" binary is built for $host, then this
5239
          # Since the "real" binary is built for $host, then this
4784
	  # wrapper might as well be built for $host, too.
5240
          # wrapper might as well be built for $host, too.
4785
	  $run $LTCC -s -o $cwrapper $cwrappersource
5241
          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
4786
	  ;;
5242
          ;;
4787
	esac
5243
        esac
4788
	$rm $output
5244
        $rm $output
4789
	trap "$rm $output; exit 1" 1 2 15
5245
        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
4790
5246
4791
	$echo > $output "\
5247
	$echo > $output "\
4792
#! $SHELL
5248
#! $SHELL
Lines 4807-4813 Link Here
4807
5263
4808
# The HP-UX ksh and POSIX shell print the target directory to stdout
5264
# The HP-UX ksh and POSIX shell print the target directory to stdout
4809
# if CDPATH is set.
5265
# if CDPATH is set.
4810
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5266
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4811
5267
4812
relink_command=\"$relink_command\"
5268
relink_command=\"$relink_command\"
4813
5269
Lines 4886-4892 Link Here
4886
      else
5342
      else
4887
	$echo \"\$relink_command_output\" >&2
5343
	$echo \"\$relink_command_output\" >&2
4888
	$rm \"\$progdir/\$file\"
5344
	$rm \"\$progdir/\$file\"
4889
	exit 1
5345
	exit $EXIT_FAILURE
4890
      fi
5346
      fi
4891
    fi
5347
    fi
4892
5348
Lines 4936-4969 Link Here
4936
	# Backslashes separate directories on plain windows
5392
	# Backslashes separate directories on plain windows
4937
	*-*-mingw | *-*-os2*)
5393
	*-*-mingw | *-*-os2*)
4938
	  $echo >> $output "\
5394
	  $echo >> $output "\
4939
      exec \$progdir\\\\\$program \${1+\"\$@\"}
5395
      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
4940
"
5396
"
4941
	  ;;
5397
	  ;;
4942
5398
4943
	*)
5399
	*)
4944
	  # Need to set LD_LIBRARY_PATH, to the value already
4945
	  # computed within libtool.
4946
	  $echo >> $output "\
5400
	  $echo >> $output "\
4947
      LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"}
5401
      exec \"\$progdir/\$program\" \${1+\"\$@\"}
4948
"
5402
"
4949
	  ;;
5403
	  ;;
4950
	esac
5404
	esac
4951
	$echo >> $output "\
5405
	$echo >> $output "\
4952
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5406
      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
4953
      exit 1
5407
      exit $EXIT_FAILURE
4954
    fi
5408
    fi
4955
  else
5409
  else
4956
    # The program doesn't exist.
5410
    # The program doesn't exist.
4957
    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5411
    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4958
    \$echo \"This script is just a wrapper for \$program.\" 1>&2
5412
    \$echo \"This script is just a wrapper for \$program.\" 1>&2
4959
    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5413
    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
4960
    exit 1
5414
    exit $EXIT_FAILURE
4961
  fi
5415
  fi
4962
fi\
5416
fi\
4963
"
5417
"
4964
	chmod +x $output
5418
	chmod +x $output
4965
      fi
5419
      fi
4966
      exit 0
5420
      exit $EXIT_SUCCESS
4967
      ;;
5421
      ;;
4968
    esac
5422
    esac
4969
5423
Lines 4986-5063 Link Here
4986
5440
4987
      if test -n "$addlibs"; then
5441
      if test -n "$addlibs"; then
4988
	gentop="$output_objdir/${outputname}x"
5442
	gentop="$output_objdir/${outputname}x"
4989
	$show "${rm}r $gentop"
4990
	$run ${rm}r "$gentop"
4991
	$show "$mkdir $gentop"
4992
	$run $mkdir "$gentop"
4993
	status=$?
4994
	if test "$status" -ne 0 && test ! -d "$gentop"; then
4995
	  exit $status
4996
	fi
4997
	generated="$generated $gentop"
5443
	generated="$generated $gentop"
4998
5444
4999
	# Add in members from convenience archives.
5445
	func_extract_archives $gentop $addlibs
5000
	for xlib in $addlibs; do
5446
	oldobjs="$oldobjs $func_extract_archives_result"
5001
	  # Extract the objects.
5002
	  case $xlib in
5003
	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5004
	  *) xabs=`pwd`"/$xlib" ;;
5005
	  esac
5006
	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5007
	  xdir="$gentop/$xlib"
5008
5009
	  $show "${rm}r $xdir"
5010
	  $run ${rm}r "$xdir"
5011
	  $show "$mkdir $xdir"
5012
	  $run $mkdir "$xdir"
5013
	  status=$?
5014
	  if test "$status" -ne 0 && test ! -d "$xdir"; then
5015
	    exit $status
5016
	  fi
5017
	  # We will extract separately just the conflicting names and we will no
5018
	  # longer touch any unique names. It is faster to leave these extract
5019
	  # automatically by $AR in one run.
5020
	  $show "(cd $xdir && $AR x $xabs)"
5021
	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5022
	  if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5023
	    :
5024
	  else
5025
	    $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5026
	    $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5027
	    $AR t "$xabs" | sort | uniq -cd | while read -r count name
5028
	    do
5029
	      i=1
5030
	      while test "$i" -le "$count"
5031
	      do
5032
	       # Put our $i before any first dot (extension)
5033
	       # Never overwrite any file
5034
	       name_to="$name"
5035
	       while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5036
	       do
5037
		 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5038
	       done
5039
	       $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5040
	       $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5041
	       i=`expr $i + 1`
5042
	      done
5043
	    done
5044
	  fi
5045
5046
	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5047
	done
5048
      fi
5447
      fi
5049
5448
5050
      compiler_flags="$compiler_flags $add_flags"
5051
5052
      # Do each command in the archive commands.
5449
      # Do each command in the archive commands.
5053
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5450
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5054
	eval cmds=\"$old_archive_from_new_cmds\"
5451
       cmds=$old_archive_from_new_cmds
5055
      else
5452
      else
5453
	# POSIX demands no paths to be encoded in archives.  We have
5454
	# to avoid creating archives with duplicate basenames if we
5455
	# might have to extract them afterwards, e.g., when creating a
5456
	# static archive out of a convenience library, or when linking
5457
	# the entirety of a libtool archive into another (currently
5458
	# not supported by libtool).
5459
	if (for obj in $oldobjs
5460
	    do
5461
	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
5462
	    done | sort | sort -uc >/dev/null 2>&1); then
5463
	  :
5464
	else
5465
	  $echo "copying selected object files to avoid basename conflicts..."
5466
5467
	  if test -z "$gentop"; then
5468
	    gentop="$output_objdir/${outputname}x"
5469
	    generated="$generated $gentop"
5470
5471
	    $show "${rm}r $gentop"
5472
	    $run ${rm}r "$gentop"
5473
	    $show "$mkdir $gentop"
5474
	    $run $mkdir "$gentop"
5475
	    exit_status=$?
5476
	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5477
	      exit $exit_status
5478
	    fi
5479
	  fi
5480
5481
	  save_oldobjs=$oldobjs
5482
	  oldobjs=
5483
	  counter=1
5484
	  for obj in $save_oldobjs
5485
	  do
5486
	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5487
	    case " $oldobjs " in
5488
	    " ") oldobjs=$obj ;;
5489
	    *[\ /]"$objbase "*)
5490
	      while :; do
5491
		# Make sure we don't pick an alternate name that also
5492
		# overlaps.
5493
		newobj=lt$counter-$objbase
5494
		counter=`expr $counter + 1`
5495
		case " $oldobjs " in
5496
		*[\ /]"$newobj "*) ;;
5497
		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
5498
		esac
5499
	      done
5500
	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5501
	      $run ln "$obj" "$gentop/$newobj" ||
5502
	      $run cp "$obj" "$gentop/$newobj"
5503
	      oldobjs="$oldobjs $gentop/$newobj"
5504
	      ;;
5505
	    *) oldobjs="$oldobjs $obj" ;;
5506
	    esac
5507
	  done
5508
	fi
5509
5056
	eval cmds=\"$old_archive_cmds\"
5510
	eval cmds=\"$old_archive_cmds\"
5057
5511
5058
	if len=`expr "X$cmds" : ".*"` &&
5512
	if len=`expr "X$cmds" : ".*"` &&
5059
	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5513
	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5060
	  :
5514
	  cmds=$old_archive_cmds
5061
	else
5515
	else
5062
	  # the command line is too long to link in one step, link in parts
5516
	  # the command line is too long to link in one step, link in parts
5063
	  $echo "using piecewise archive linking..."
5517
	  $echo "using piecewise archive linking..."
Lines 5066-5096 Link Here
5066
	  objlist=
5520
	  objlist=
5067
	  concat_cmds=
5521
	  concat_cmds=
5068
	  save_oldobjs=$oldobjs
5522
	  save_oldobjs=$oldobjs
5069
	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5523
5070
	  # encoded into archives.  This makes 'ar r' malfunction in
5071
	  # this piecewise linking case whenever conflicting object
5072
	  # names appear in distinct ar calls; check, warn and compensate.
5073
	    if (for obj in $save_oldobjs
5074
	    do
5075
	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
5076
	    done | sort | sort -uc >/dev/null 2>&1); then
5077
	    :
5078
	  else
5079
	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5080
	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5081
	    AR_FLAGS=cq
5082
	  fi
5083
	  # Is there a better way of finding the last object in the list?
5524
	  # Is there a better way of finding the last object in the list?
5084
	  for obj in $save_oldobjs
5525
	  for obj in $save_oldobjs
5085
	  do
5526
	  do
5086
	    last_oldobj=$obj
5527
	    last_oldobj=$obj
5087
	  done  
5528
	  done
5088
	  for obj in $save_oldobjs
5529
	  for obj in $save_oldobjs
5089
	  do
5530
	  do
5090
	    oldobjs="$objlist $obj"
5531
	    oldobjs="$objlist $obj"
5091
	    objlist="$objlist $obj"
5532
	    objlist="$objlist $obj"
5092
	    eval test_cmds=\"$old_archive_cmds\"
5533
	    eval test_cmds=\"$old_archive_cmds\"
5093
	    if len=`expr "X$test_cmds" : ".*"` &&
5534
	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5094
	       test "$len" -le "$max_cmd_len"; then
5535
	       test "$len" -le "$max_cmd_len"; then
5095
	      :
5536
	      :
5096
	    else
5537
	    else
Lines 5098-5104 Link Here
5098
	      oldobjs=$objlist
5539
	      oldobjs=$objlist
5099
	      if test "$obj" = "$last_oldobj" ; then
5540
	      if test "$obj" = "$last_oldobj" ; then
5100
	        RANLIB=$save_RANLIB
5541
	        RANLIB=$save_RANLIB
5101
	      fi  
5542
	      fi
5102
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5543
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5103
	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5544
	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5104
	      objlist=
5545
	      objlist=
Lines 5109-5120 Link Here
5109
	  if test "X$oldobjs" = "X" ; then
5550
	  if test "X$oldobjs" = "X" ; then
5110
	    eval cmds=\"\$concat_cmds\"
5551
	    eval cmds=\"\$concat_cmds\"
5111
	  else
5552
	  else
5112
	    eval cmds=\"\$concat_cmds~$old_archive_cmds\"
5553
	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5113
	  fi
5554
	  fi
5114
	fi
5555
	fi
5115
      fi
5556
      fi
5116
      save_ifs="$IFS"; IFS='~'
5557
      save_ifs="$IFS"; IFS='~'
5117
      for cmd in $cmds; do
5558
      for cmd in $cmds; do
5559
        eval cmd=\"$cmd\"
5118
	IFS="$save_ifs"
5560
	IFS="$save_ifs"
5119
	$show "$cmd"
5561
	$show "$cmd"
5120
	$run eval "$cmd" || exit $?
5562
	$run eval "$cmd" || exit $?
Lines 5146-5156 Link Here
5146
	fi
5588
	fi
5147
      done
5589
      done
5148
      # Quote the link command for shipping.
5590
      # Quote the link command for shipping.
5149
      relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
5591
      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5150
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5592
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5151
      if test "$hardcode_automatic" = yes ; then
5593
      if test "$hardcode_automatic" = yes ; then
5152
        relink_command=
5594
	relink_command=
5153
      fi  
5595
      fi
5596
5597
5154
      # Only create the output if not a dry run.
5598
      # Only create the output if not a dry run.
5155
      if test -z "$run"; then
5599
      if test -z "$run"; then
5156
	for installed in no yes; do
5600
	for installed in no yes; do
Lines 5168-5174 Link Here
5168
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5612
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5169
		if test -z "$libdir"; then
5613
		if test -z "$libdir"; then
5170
		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5614
		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5171
		  exit 1
5615
		  exit $EXIT_FAILURE
5172
		fi
5616
		fi
5173
		newdependency_libs="$newdependency_libs $libdir/$name"
5617
		newdependency_libs="$newdependency_libs $libdir/$name"
5174
		;;
5618
		;;
Lines 5182-5188 Link Here
5182
	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5626
	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5183
	      if test -z "$libdir"; then
5627
	      if test -z "$libdir"; then
5184
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5628
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5185
		exit 1
5629
		exit $EXIT_FAILURE
5186
	      fi
5630
	      fi
5187
	      newdlfiles="$newdlfiles $libdir/$name"
5631
	      newdlfiles="$newdlfiles $libdir/$name"
5188
	    done
5632
	    done
Lines 5193-5203 Link Here
5193
	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5637
	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5194
	      if test -z "$libdir"; then
5638
	      if test -z "$libdir"; then
5195
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5639
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5196
		exit 1
5640
		exit $EXIT_FAILURE
5197
	      fi
5641
	      fi
5198
	      newdlprefiles="$newdlprefiles $libdir/$name"
5642
	      newdlprefiles="$newdlprefiles $libdir/$name"
5199
	    done
5643
	    done
5200
	    dlprefiles="$newdlprefiles"
5644
	    dlprefiles="$newdlprefiles"
5645
	  else
5646
	    newdlfiles=
5647
	    for lib in $dlfiles; do
5648
	      case $lib in
5649
		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5650
		*) abs=`pwd`"/$lib" ;;
5651
	      esac
5652
	      newdlfiles="$newdlfiles $abs"
5653
	    done
5654
	    dlfiles="$newdlfiles"
5655
	    newdlprefiles=
5656
	    for lib in $dlprefiles; do
5657
	      case $lib in
5658
		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5659
		*) abs=`pwd`"/$lib" ;;
5660
	      esac
5661
	      newdlprefiles="$newdlprefiles $abs"
5662
	    done
5663
	    dlprefiles="$newdlprefiles"
5201
	  fi
5664
	  fi
5202
	  $rm $output
5665
	  $rm $output
5203
	  # place dlname in correct position for cygwin
5666
	  # place dlname in correct position for cygwin
Lines 5241-5247 Link Here
5241
5704
5242
# Directory that this library needs to be installed in:
5705
# Directory that this library needs to be installed in:
5243
libdir='$install_libdir'"
5706
libdir='$install_libdir'"
5244
	  if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then
5707
	  if test "$installed" = no && test "$need_relink" = yes; then
5245
	    $echo >> $output "\
5708
	    $echo >> $output "\
5246
relink_command=\"$relink_command\""
5709
relink_command=\"$relink_command\""
5247
	  fi
5710
	  fi
Lines 5254-5260 Link Here
5254
      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5717
      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5255
      ;;
5718
      ;;
5256
    esac
5719
    esac
5257
    exit 0
5720
    exit $EXIT_SUCCESS
5258
    ;;
5721
    ;;
5259
5722
5260
  # libtool install mode
5723
  # libtool install mode
Lines 5265-5275 Link Here
5265
    # install_prog (especially on Windows NT).
5728
    # install_prog (especially on Windows NT).
5266
    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5729
    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5267
       # Allow the use of GNU shtool's install command.
5730
       # Allow the use of GNU shtool's install command.
5268
       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5731
       $echo "X$nonopt" | grep shtool > /dev/null; then
5269
      # Aesthetically quote it.
5732
      # Aesthetically quote it.
5270
      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5733
      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5271
      case $arg in
5734
      case $arg in
5272
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
5735
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5273
	arg="\"$arg\""
5736
	arg="\"$arg\""
5274
	;;
5737
	;;
5275
      esac
5738
      esac
Lines 5278-5291 Link Here
5278
      shift
5741
      shift
5279
    else
5742
    else
5280
      install_prog=
5743
      install_prog=
5281
      arg="$nonopt"
5744
      arg=$nonopt
5282
    fi
5745
    fi
5283
5746
5284
    # The real first argument should be the name of the installation program.
5747
    # The real first argument should be the name of the installation program.
5285
    # Aesthetically quote it.
5748
    # Aesthetically quote it.
5286
    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5749
    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5287
    case $arg in
5750
    case $arg in
5288
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
5751
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5289
      arg="\"$arg\""
5752
      arg="\"$arg\""
5290
      ;;
5753
      ;;
5291
    esac
5754
    esac
Lines 5303-5330 Link Here
5303
    do
5766
    do
5304
      if test -n "$dest"; then
5767
      if test -n "$dest"; then
5305
	files="$files $dest"
5768
	files="$files $dest"
5306
	dest="$arg"
5769
	dest=$arg
5307
	continue
5770
	continue
5308
      fi
5771
      fi
5309
5772
5310
      case $arg in
5773
      case $arg in
5311
      -d) isdir=yes ;;
5774
      -d) isdir=yes ;;
5312
      -f) prev="-f" ;;
5775
      -f) 
5313
      -g) prev="-g" ;;
5776
      	case " $install_prog " in
5314
      -m) prev="-m" ;;
5777
	*[\\\ /]cp\ *) ;;
5315
      -o) prev="-o" ;;
5778
	*) prev=$arg ;;
5779
	esac
5780
	;;
5781
      -g | -m | -o) prev=$arg ;;
5316
      -s)
5782
      -s)
5317
	stripme=" -s"
5783
	stripme=" -s"
5318
	continue
5784
	continue
5319
	;;
5785
	;;
5320
      -*) ;;
5786
      -*)
5321
5787
	;;
5322
      *)
5788
      *)
5323
	# If the previous option needed an argument, then skip it.
5789
	# If the previous option needed an argument, then skip it.
5324
	if test -n "$prev"; then
5790
	if test -n "$prev"; then
5325
	  prev=
5791
	  prev=
5326
	else
5792
	else
5327
	  dest="$arg"
5793
	  dest=$arg
5328
	  continue
5794
	  continue
5329
	fi
5795
	fi
5330
	;;
5796
	;;
Lines 5333-5339 Link Here
5333
      # Aesthetically quote the argument.
5799
      # Aesthetically quote the argument.
5334
      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5800
      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5335
      case $arg in
5801
      case $arg in
5336
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
5802
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
5337
	arg="\"$arg\""
5803
	arg="\"$arg\""
5338
	;;
5804
	;;
5339
      esac
5805
      esac
Lines 5343-5355 Link Here
5343
    if test -z "$install_prog"; then
5809
    if test -z "$install_prog"; then
5344
      $echo "$modename: you must specify an install program" 1>&2
5810
      $echo "$modename: you must specify an install program" 1>&2
5345
      $echo "$help" 1>&2
5811
      $echo "$help" 1>&2
5346
      exit 1
5812
      exit $EXIT_FAILURE
5347
    fi
5813
    fi
5348
5814
5349
    if test -n "$prev"; then
5815
    if test -n "$prev"; then
5350
      $echo "$modename: the \`$prev' option requires an argument" 1>&2
5816
      $echo "$modename: the \`$prev' option requires an argument" 1>&2
5351
      $echo "$help" 1>&2
5817
      $echo "$help" 1>&2
5352
      exit 1
5818
      exit $EXIT_FAILURE
5353
    fi
5819
    fi
5354
5820
5355
    if test -z "$files"; then
5821
    if test -z "$files"; then
Lines 5359-5365 Link Here
5359
	$echo "$modename: you must specify a destination" 1>&2
5825
	$echo "$modename: you must specify a destination" 1>&2
5360
      fi
5826
      fi
5361
      $echo "$help" 1>&2
5827
      $echo "$help" 1>&2
5362
      exit 1
5828
      exit $EXIT_FAILURE
5363
    fi
5829
    fi
5364
5830
5365
    # Strip any trailing slash from the destination.
5831
    # Strip any trailing slash from the destination.
Lines 5380-5386 Link Here
5380
      if test "$#" -gt 2; then
5846
      if test "$#" -gt 2; then
5381
	$echo "$modename: \`$dest' is not a directory" 1>&2
5847
	$echo "$modename: \`$dest' is not a directory" 1>&2
5382
	$echo "$help" 1>&2
5848
	$echo "$help" 1>&2
5383
	exit 1
5849
	exit $EXIT_FAILURE
5384
      fi
5850
      fi
5385
    fi
5851
    fi
5386
    case $destdir in
5852
    case $destdir in
Lines 5392-5398 Link Here
5392
	*)
5858
	*)
5393
	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5859
	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5394
	  $echo "$help" 1>&2
5860
	  $echo "$help" 1>&2
5395
	  exit 1
5861
	  exit $EXIT_FAILURE
5396
	  ;;
5862
	  ;;
5397
	esac
5863
	esac
5398
      done
5864
      done
Lines 5421-5427 Link Here
5421
	else
5887
	else
5422
	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5888
	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5423
	  $echo "$help" 1>&2
5889
	  $echo "$help" 1>&2
5424
	  exit 1
5890
	  exit $EXIT_FAILURE
5425
	fi
5891
	fi
5426
5892
5427
	library_names=
5893
	library_names=
Lines 5463-5469 Link Here
5463
	  # but it's something to keep an eye on.
5929
	  # but it's something to keep an eye on.
5464
	  if test "$inst_prefix_dir" = "$destdir"; then
5930
	  if test "$inst_prefix_dir" = "$destdir"; then
5465
	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5931
	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5466
	    exit 1
5932
	    exit $EXIT_FAILURE
5467
	  fi
5933
	  fi
5468
5934
5469
	  if test -n "$inst_prefix_dir"; then
5935
	  if test -n "$inst_prefix_dir"; then
Lines 5478-5484 Link Here
5478
	  if $run eval "$relink_command"; then :
5944
	  if $run eval "$relink_command"; then :
5479
	  else
5945
	  else
5480
	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5946
	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5481
	    exit 1
5947
	    exit $EXIT_FAILURE
5482
	  fi
5948
	  fi
5483
	fi
5949
	fi
5484
5950
Lines 5502-5524 Link Here
5502
5968
5503
	  if test "$#" -gt 0; then
5969
	  if test "$#" -gt 0; then
5504
	    # Delete the old symlinks, and create new ones.
5970
	    # Delete the old symlinks, and create new ones.
5971
	    # Try `ln -sf' first, because the `ln' binary might depend on
5972
	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
5973
	    # so we also need to try rm && ln -s.
5505
	    for linkname
5974
	    for linkname
5506
	    do
5975
	    do
5507
	      if test "$linkname" != "$realname"; then
5976
	      if test "$linkname" != "$realname"; then
5508
		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5977
                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5509
		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5978
                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5510
	      fi
5979
	      fi
5511
	    done
5980
	    done
5512
	  fi
5981
	  fi
5513
5982
5514
	  # Do each command in the postinstall commands.
5983
	  # Do each command in the postinstall commands.
5515
	  lib="$destdir/$realname"
5984
	  lib="$destdir/$realname"
5516
	  eval cmds=\"$postinstall_cmds\"
5985
	  cmds=$postinstall_cmds
5517
	  save_ifs="$IFS"; IFS='~'
5986
	  save_ifs="$IFS"; IFS='~'
5518
	  for cmd in $cmds; do
5987
	  for cmd in $cmds; do
5519
	    IFS="$save_ifs"
5988
	    IFS="$save_ifs"
5989
	    eval cmd=\"$cmd\"
5520
	    $show "$cmd"
5990
	    $show "$cmd"
5521
	    $run eval "$cmd" || exit $?
5991
	    $run eval "$cmd" || {
5992
	      lt_exit=$?
5993
5994
	      # Restore the uninstalled library and exit
5995
	      if test "$mode" = relink; then
5996
		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
5997
	      fi
5998
5999
	      exit $lt_exit
6000
	    }
5522
	  done
6001
	  done
5523
	  IFS="$save_ifs"
6002
	  IFS="$save_ifs"
5524
	fi
6003
	fi
Lines 5556-5562 Link Here
5556
	*)
6035
	*)
5557
	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6036
	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5558
	  $echo "$help" 1>&2
6037
	  $echo "$help" 1>&2
5559
	  exit 1
6038
	  exit $EXIT_FAILURE
5560
	  ;;
6039
	  ;;
5561
	esac
6040
	esac
5562
6041
Lines 5574-5580 Link Here
5574
	  $show "$install_prog $staticobj $staticdest"
6053
	  $show "$install_prog $staticobj $staticdest"
5575
	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6054
	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
5576
	fi
6055
	fi
5577
	exit 0
6056
	exit $EXIT_SUCCESS
5578
	;;
6057
	;;
5579
6058
5580
      *)
6059
      *)
Lines 5612-5634 Link Here
5612
	  notinst_deplibs=
6091
	  notinst_deplibs=
5613
	  relink_command=
6092
	  relink_command=
5614
6093
5615
	  # To insure that "foo" is sourced, and not "foo.exe",
6094
	  # Note that it is not necessary on cygwin/mingw to append a dot to
5616
	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
6095
	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
5617
	  # which disallows the automatic-append-.exe behavior.
6096
	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
5618
	  case $build in
6097
	  # `FILE.' does not work on cygwin managed mounts.
5619
	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6098
	  #
5620
	  *) wrapperdot=${wrapper} ;;
5621
	  esac
5622
	  # If there is no directory component, then add one.
6099
	  # If there is no directory component, then add one.
5623
	  case $file in
6100
	  case $wrapper in
5624
	  */* | *\\*) . ${wrapperdot} ;;
6101
	  */* | *\\*) . ${wrapper} ;;
5625
	  *) . ./${wrapperdot} ;;
6102
	  *) . ./${wrapper} ;;
5626
	  esac
6103
	  esac
5627
6104
5628
	  # Check the variables that should have been set.
6105
	  # Check the variables that should have been set.
5629
	  if test -z "$notinst_deplibs"; then
6106
	  if test -z "$notinst_deplibs"; then
5630
	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6107
	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5631
	    exit 1
6108
	    exit $EXIT_FAILURE
5632
	  fi
6109
	  fi
5633
6110
5634
	  finalize=yes
6111
	  finalize=yes
Lines 5650-5679 Link Here
5650
	  done
6127
	  done
5651
6128
5652
	  relink_command=
6129
	  relink_command=
5653
	  # To insure that "foo" is sourced, and not "foo.exe",
6130
	  # Note that it is not necessary on cygwin/mingw to append a dot to
5654
	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
6131
	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
5655
	  # which disallows the automatic-append-.exe behavior.
6132
	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
5656
	  case $build in
6133
	  # `FILE.' does not work on cygwin managed mounts.
5657
	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6134
	  #
5658
	  *) wrapperdot=${wrapper} ;;
5659
	  esac
5660
	  # If there is no directory component, then add one.
6135
	  # If there is no directory component, then add one.
5661
	  case $file in
6136
	  case $wrapper in
5662
	  */* | *\\*) . ${wrapperdot} ;;
6137
	  */* | *\\*) . ${wrapper} ;;
5663
	  *) . ./${wrapperdot} ;;
6138
	  *) . ./${wrapper} ;;
5664
	  esac
6139
	  esac
5665
6140
5666
	  outputname=
6141
	  outputname=
5667
	  if test "$fast_install" = no && test -n "$relink_command"; then
6142
	  if test "$fast_install" = no && test -n "$relink_command"; then
5668
	    if test "$finalize" = yes && test -z "$run"; then
6143
	    if test "$finalize" = yes && test -z "$run"; then
5669
	      tmpdir="/tmp"
6144
	      tmpdir=`func_mktempdir`
5670
	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
5671
	      tmpdir="$tmpdir/libtool-$$"
5672
	      if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
5673
	      else
5674
		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
5675
		continue
5676
	      fi
5677
	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6145
	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
5678
	      outputname="$tmpdir/$file"
6146
	      outputname="$tmpdir/$file"
5679
	      # Replace the output file specification.
6147
	      # Replace the output file specification.
Lines 5697-5703 Link Here
5697
	fi
6165
	fi
5698
6166
5699
	# remove .exe since cygwin /usr/bin/install will append another
6167
	# remove .exe since cygwin /usr/bin/install will append another
5700
	# one anyways
6168
	# one anyway 
5701
	case $install_prog,$host in
6169
	case $install_prog,$host in
5702
	*/usr/bin/install*,*cygwin*)
6170
	*/usr/bin/install*,*cygwin*)
5703
	  case $file:$destfile in
6171
	  case $file:$destfile in
Lines 5729-5744 Link Here
5729
      $show "$install_prog $file $oldlib"
6197
      $show "$install_prog $file $oldlib"
5730
      $run eval "$install_prog \$file \$oldlib" || exit $?
6198
      $run eval "$install_prog \$file \$oldlib" || exit $?
5731
6199
5732
      if test -n "$stripme" && test -n "$striplib"; then
6200
      if test -n "$stripme" && test -n "$old_striplib"; then
5733
	$show "$old_striplib $oldlib"
6201
	$show "$old_striplib $oldlib"
5734
	$run eval "$old_striplib $oldlib" || exit $?
6202
	$run eval "$old_striplib $oldlib" || exit $?
5735
      fi
6203
      fi
5736
6204
5737
      # Do each command in the postinstall commands.
6205
      # Do each command in the postinstall commands.
5738
      eval cmds=\"$old_postinstall_cmds\"
6206
      cmds=$old_postinstall_cmds
5739
      save_ifs="$IFS"; IFS='~'
6207
      save_ifs="$IFS"; IFS='~'
5740
      for cmd in $cmds; do
6208
      for cmd in $cmds; do
5741
	IFS="$save_ifs"
6209
	IFS="$save_ifs"
6210
	eval cmd=\"$cmd\"
5742
	$show "$cmd"
6211
	$show "$cmd"
5743
	$run eval "$cmd" || exit $?
6212
	$run eval "$cmd" || exit $?
5744
      done
6213
      done
Lines 5752-5760 Link Here
5752
    if test -n "$current_libdirs"; then
6221
    if test -n "$current_libdirs"; then
5753
      # Maybe just do a dry run.
6222
      # Maybe just do a dry run.
5754
      test -n "$run" && current_libdirs=" -n$current_libdirs"
6223
      test -n "$run" && current_libdirs=" -n$current_libdirs"
5755
      exec_cmd='$SHELL $0 --finish$current_libdirs'
6224
      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
5756
    else
6225
    else
5757
      exit 0
6226
      exit $EXIT_SUCCESS
5758
    fi
6227
    fi
5759
    ;;
6228
    ;;
5760
6229
Lines 5773-5782 Link Here
5773
      for libdir in $libdirs; do
6242
      for libdir in $libdirs; do
5774
	if test -n "$finish_cmds"; then
6243
	if test -n "$finish_cmds"; then
5775
	  # Do each command in the finish commands.
6244
	  # Do each command in the finish commands.
5776
	  eval cmds=\"$finish_cmds\"
6245
	  cmds=$finish_cmds
5777
	  save_ifs="$IFS"; IFS='~'
6246
	  save_ifs="$IFS"; IFS='~'
5778
	  for cmd in $cmds; do
6247
	  for cmd in $cmds; do
5779
	    IFS="$save_ifs"
6248
	    IFS="$save_ifs"
6249
	    eval cmd=\"$cmd\"
5780
	    $show "$cmd"
6250
	    $show "$cmd"
5781
	    $run eval "$cmd" || admincmds="$admincmds
6251
	    $run eval "$cmd" || admincmds="$admincmds
5782
       $cmd"
6252
       $cmd"
Lines 5793-5801 Link Here
5793
    fi
6263
    fi
5794
6264
5795
    # Exit here if they wanted silent mode.
6265
    # Exit here if they wanted silent mode.
5796
    exit 0
6266
    test "$show" = : && exit $EXIT_SUCCESS
5797
6267
5798
    $echo "----------------------------------------------------------------------"
6268
    $echo "X----------------------------------------------------------------------" | $Xsed
5799
    $echo "Libraries have been installed in:"
6269
    $echo "Libraries have been installed in:"
5800
    for libdir in $libdirs; do
6270
    for libdir in $libdirs; do
5801
      $echo "   $libdir"
6271
      $echo "   $libdir"
Lines 5828-5835 Link Here
5828
    $echo
6298
    $echo
5829
    $echo "See any operating system documentation about shared libraries for"
6299
    $echo "See any operating system documentation about shared libraries for"
5830
    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6300
    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
5831
    $echo "----------------------------------------------------------------------"
6301
    $echo "X----------------------------------------------------------------------" | $Xsed
5832
    exit 0
6302
    exit $EXIT_SUCCESS
5833
    ;;
6303
    ;;
5834
6304
5835
  # libtool execute mode
6305
  # libtool execute mode
Lines 5841-5847 Link Here
5841
    if test -z "$cmd"; then
6311
    if test -z "$cmd"; then
5842
      $echo "$modename: you must specify a COMMAND" 1>&2
6312
      $echo "$modename: you must specify a COMMAND" 1>&2
5843
      $echo "$help"
6313
      $echo "$help"
5844
      exit 1
6314
      exit $EXIT_FAILURE
5845
    fi
6315
    fi
5846
6316
5847
    # Handle -dlopen flags immediately.
6317
    # Handle -dlopen flags immediately.
Lines 5849-5855 Link Here
5849
      if test ! -f "$file"; then
6319
      if test ! -f "$file"; then
5850
	$echo "$modename: \`$file' is not a file" 1>&2
6320
	$echo "$modename: \`$file' is not a file" 1>&2
5851
	$echo "$help" 1>&2
6321
	$echo "$help" 1>&2
5852
	exit 1
6322
	exit $EXIT_FAILURE
5853
      fi
6323
      fi
5854
6324
5855
      dir=
6325
      dir=
Lines 5860-5866 Link Here
5860
	else
6330
	else
5861
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6331
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5862
	  $echo "$help" 1>&2
6332
	  $echo "$help" 1>&2
5863
	  exit 1
6333
	  exit $EXIT_FAILURE
5864
	fi
6334
	fi
5865
6335
5866
	# Read the libtool library.
6336
	# Read the libtool library.
Lines 5887-5893 Link Here
5887
	  dir="$dir/$objdir"
6357
	  dir="$dir/$objdir"
5888
	else
6358
	else
5889
	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6359
	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
5890
	  exit 1
6360
	  exit $EXIT_FAILURE
5891
	fi
6361
	fi
5892
	;;
6362
	;;
5893
6363
Lines 5967-5973 Link Here
5967
	$echo "export $shlibpath_var"
6437
	$echo "export $shlibpath_var"
5968
      fi
6438
      fi
5969
      $echo "$cmd$args"
6439
      $echo "$cmd$args"
5970
      exit 0
6440
      exit $EXIT_SUCCESS
5971
    fi
6441
    fi
5972
    ;;
6442
    ;;
5973
6443
Lines 5995-6001 Link Here
5995
    if test -z "$rm"; then
6465
    if test -z "$rm"; then
5996
      $echo "$modename: you must specify an RM program" 1>&2
6466
      $echo "$modename: you must specify an RM program" 1>&2
5997
      $echo "$help" 1>&2
6467
      $echo "$help" 1>&2
5998
      exit 1
6468
      exit $EXIT_FAILURE
5999
    fi
6469
    fi
6000
6470
6001
    rmdirs=
6471
    rmdirs=
Lines 6045-6059 Link Here
6045
	    rmfiles="$rmfiles $objdir/$n"
6515
	    rmfiles="$rmfiles $objdir/$n"
6046
	  done
6516
	  done
6047
	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6517
	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6048
	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6049
6518
6050
	  if test "$mode" = uninstall; then
6519
	  case "$mode" in
6520
	  clean)
6521
	    case "  $library_names " in
6522
	    # "  " in the beginning catches empty $dlname
6523
	    *" $dlname "*) ;;
6524
	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
6525
	    esac
6526
	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6527
	    ;;
6528
	  uninstall)
6051
	    if test -n "$library_names"; then
6529
	    if test -n "$library_names"; then
6052
	      # Do each command in the postuninstall commands.
6530
	      # Do each command in the postuninstall commands.
6053
	      eval cmds=\"$postuninstall_cmds\"
6531
	      cmds=$postuninstall_cmds
6054
	      save_ifs="$IFS"; IFS='~'
6532
	      save_ifs="$IFS"; IFS='~'
6055
	      for cmd in $cmds; do
6533
	      for cmd in $cmds; do
6056
		IFS="$save_ifs"
6534
		IFS="$save_ifs"
6535
		eval cmd=\"$cmd\"
6057
		$show "$cmd"
6536
		$show "$cmd"
6058
		$run eval "$cmd"
6537
		$run eval "$cmd"
6059
		if test "$?" -ne 0 && test "$rmforce" != yes; then
6538
		if test "$?" -ne 0 && test "$rmforce" != yes; then
Lines 6065-6074 Link Here
6065
6544
6066
	    if test -n "$old_library"; then
6545
	    if test -n "$old_library"; then
6067
	      # Do each command in the old_postuninstall commands.
6546
	      # Do each command in the old_postuninstall commands.
6068
	      eval cmds=\"$old_postuninstall_cmds\"
6547
	      cmds=$old_postuninstall_cmds
6069
	      save_ifs="$IFS"; IFS='~'
6548
	      save_ifs="$IFS"; IFS='~'
6070
	      for cmd in $cmds; do
6549
	      for cmd in $cmds; do
6071
		IFS="$save_ifs"
6550
		IFS="$save_ifs"
6551
		eval cmd=\"$cmd\"
6072
		$show "$cmd"
6552
		$show "$cmd"
6073
		$run eval "$cmd"
6553
		$run eval "$cmd"
6074
		if test "$?" -ne 0 && test "$rmforce" != yes; then
6554
		if test "$?" -ne 0 && test "$rmforce" != yes; then
Lines 6078-6084 Link Here
6078
	      IFS="$save_ifs"
6558
	      IFS="$save_ifs"
6079
	    fi
6559
	    fi
6080
	    # FIXME: should reinstall the best remaining shared library.
6560
	    # FIXME: should reinstall the best remaining shared library.
6081
	  fi
6561
	    ;;
6562
	  esac
6082
	fi
6563
	fi
6083
	;;
6564
	;;
6084
6565
Lines 6107-6113 Link Here
6107
	if test "$mode" = clean ; then
6588
	if test "$mode" = clean ; then
6108
	  noexename=$name
6589
	  noexename=$name
6109
	  case $file in
6590
	  case $file in
6110
	  *.exe) 
6591
	  *.exe)
6111
	    file=`$echo $file|${SED} 's,.exe$,,'`
6592
	    file=`$echo $file|${SED} 's,.exe$,,'`
6112
	    noexename=`$echo $name|${SED} 's,.exe$,,'`
6593
	    noexename=`$echo $name|${SED} 's,.exe$,,'`
6113
	    # $file with .exe has already been added to rmfiles,
6594
	    # $file with .exe has already been added to rmfiles,
Lines 6152-6171 Link Here
6152
  "")
6633
  "")
6153
    $echo "$modename: you must specify a MODE" 1>&2
6634
    $echo "$modename: you must specify a MODE" 1>&2
6154
    $echo "$generic_help" 1>&2
6635
    $echo "$generic_help" 1>&2
6155
    exit 1
6636
    exit $EXIT_FAILURE
6156
    ;;
6637
    ;;
6157
  esac
6638
  esac
6158
6639
6159
  if test -z "$exec_cmd"; then
6640
  if test -z "$exec_cmd"; then
6160
    $echo "$modename: invalid operation mode \`$mode'" 1>&2
6641
    $echo "$modename: invalid operation mode \`$mode'" 1>&2
6161
    $echo "$generic_help" 1>&2
6642
    $echo "$generic_help" 1>&2
6162
    exit 1
6643
    exit $EXIT_FAILURE
6163
  fi
6644
  fi
6164
fi # test -z "$show_help"
6645
fi # test -z "$show_help"
6165
6646
6166
if test -n "$exec_cmd"; then
6647
if test -n "$exec_cmd"; then
6167
  eval exec $exec_cmd
6648
  eval exec $exec_cmd
6168
  exit 1
6649
  exit $EXIT_FAILURE
6169
fi
6650
fi
6170
6651
6171
# We need to display help for each of the modes.
6652
# We need to display help for each of the modes.
Lines 6201-6207 Link Here
6201
a more detailed description of MODE.
6682
a more detailed description of MODE.
6202
6683
6203
Report bugs to <bug-libtool@gnu.org>."
6684
Report bugs to <bug-libtool@gnu.org>."
6204
  exit 0
6685
  exit $EXIT_SUCCESS
6205
  ;;
6686
  ;;
6206
6687
6207
clean)
6688
clean)
Lines 6313-6318 Link Here
6313
  -no-undefined     declare that a library does not refer to external symbols
6794
  -no-undefined     declare that a library does not refer to external symbols
6314
  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
6795
  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
6315
  -objectlist FILE  Use a list of object files found in FILE to specify objects
6796
  -objectlist FILE  Use a list of object files found in FILE to specify objects
6797
  -precious-files-regex REGEX
6798
                    don't remove output files matching REGEX
6316
  -release RELEASE  specify package release information
6799
  -release RELEASE  specify package release information
6317
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6800
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
6318
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
6801
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
Lines 6354-6367 Link Here
6354
*)
6837
*)
6355
  $echo "$modename: invalid operation mode \`$mode'" 1>&2
6838
  $echo "$modename: invalid operation mode \`$mode'" 1>&2
6356
  $echo "$help" 1>&2
6839
  $echo "$help" 1>&2
6357
  exit 1
6840
  exit $EXIT_FAILURE
6358
  ;;
6841
  ;;
6359
esac
6842
esac
6360
6843
6361
$echo
6844
$echo
6362
$echo "Try \`$modename --help' for more information about other modes."
6845
$echo "Try \`$modename --help' for more information about other modes."
6363
6846
6364
exit 0
6847
exit $?
6365
6848
6366
# The TAGs below are defined such that we never get into a situation
6849
# The TAGs below are defined such that we never get into a situation
6367
# in which we disable both kinds of libraries.  Given conflicting
6850
# in which we disable both kinds of libraries.  Given conflicting
Lines 6375-6386 Link Here
6375
# configuration.  But we'll never go from static-only to shared-only.
6858
# configuration.  But we'll never go from static-only to shared-only.
6376
6859
6377
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6860
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6378
build_libtool_libs=no
6861
disable_libs=shared
6379
build_old_libs=yes
6380
# ### END LIBTOOL TAG CONFIG: disable-shared
6862
# ### END LIBTOOL TAG CONFIG: disable-shared
6381
6863
6382
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6864
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6383
build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6865
disable_libs=static
6384
# ### END LIBTOOL TAG CONFIG: disable-static
6866
# ### END LIBTOOL TAG CONFIG: disable-static
6385
6867
6386
# Local Variables:
6868
# Local Variables:

Return to bug 1194