~ubuntu-branches/ubuntu/quantal/gutenprint/quantal

« back to all changes in this revision

Viewing changes to m4/libtool.m4

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-02-14 22:41:51 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20120214224151-81lkvr2cow0u55f5
Tags: 5.2.8~pre1-0ubuntu1
* New upstream release
  - Added support for Canon BJC 4550, S330, S520, S530D, S630, S750, S820,
    S830D, S900, S9000, PIXMA mini220, mini320, mini360, i50, i70, i450,
    i455, i470D. i550, i900D, i950, i960, i6100, i6500, i9100, i9900,
    iP3300, iP3500, iP3600, iP4900, iP6210D, iP6220D, iP6310D, iP7100,
    iP7500, iP8100, iP8600, iP9910, MP140, MP190, MP210, MP240, MP375R,
    MP470, MP490, MP530, MP900, MG2100, MG3100, MG4100, MG5300, MG6200,
    MG8200, EPSON ME Office 940FW, PX 204, PX 504A, Stylus CX3900, NX530,
    NX635, SX535WD, Stylus Office BX535WD, BX630FW, BX635FWD, TX620FWD,
    Stylus Photo RX650, WorkForce 545, 630, 645, Stylus Pro 7900/9900
    (Partial -- no orange/green inks).
  - Printers redefined: Canon BJC 3000, S300, S500, S600, S800, PIXMA i80,
    i560, i850, i860, i865, iP2000, iP4100, iP5000, MP600, MP750, MP760,
    MP770, MP780, MP790, MP970
  - Support for the following printers was greatly improved, or tested:
    Canon PIXMA MP700, MP710, MP730, MP740, MP950, MP960, MX340, MX350,
    iP4000, MG5100
  - Canon BJC series printers using photo cartridge have printing modes
    added that will select this cartridge.
  - A crash with the EPSON Stylus Photo R3000 has been fixed.
  - Chinese (Mandarin), Galician, and Ukrainian translations have
    been added.
* debian/patches/0001-patch-stdio.h-is-required-by-commandtoepson-and-comm.patch:
  Removed, applied upstream.
* 0002-genppd-don-t-write-color-profile-information-with-br.patch: Refreshed
  with quilt.
* debian/printer-driver-gutenprint.ppd-updater,
  debian/foomatic-db-gutenprint.ppd-updater: Support also pre-releases with
  "-preX" version number extension.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2
2
#
3
3
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4
 
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
4
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
5
#                 Inc.
5
6
#   Written by Gordon Matzigkeit, 1996
6
7
#
7
8
# This file is free software; the Free Software Foundation gives
10
11
 
11
12
m4_define([_LT_COPYING], [dnl
12
13
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13
 
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
14
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
15
#                 Inc.
14
16
#   Written by Gordon Matzigkeit, 1996
15
17
#
16
18
#   This file is part of GNU Libtool.
37
39
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
38
40
])
39
41
 
40
 
# serial 56 LT_INIT
 
42
# serial 57 LT_INIT
41
43
 
42
44
 
43
45
# LT_PREREQ(VERSION)
66
68
# ------------------
67
69
AC_DEFUN([LT_INIT],
68
70
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
71
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
69
72
AC_BEFORE([$0], [LT_LANG])dnl
70
73
AC_BEFORE([$0], [LT_OUTPUT])dnl
71
74
AC_BEFORE([$0], [LTDL_INIT])dnl
82
85
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
83
86
m4_require([_LT_PROG_LTMAIN])dnl
84
87
 
 
88
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
 
89
 
85
90
dnl Parse OPTIONS
86
91
_LT_SET_OPTIONS([$0], [$1])
87
92
 
118
123
    *) break;;
119
124
  esac
120
125
done
121
 
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
126
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
122
127
])
123
128
 
124
129
 
138
143
m4_defun([_LT_SETUP],
139
144
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
140
145
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
146
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 
147
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
148
 
141
149
_LT_DECL([], [host_alias], [0], [The host system])dnl
142
150
_LT_DECL([], [host], [0])dnl
143
151
_LT_DECL([], [host_os], [0])dnl
160
168
dnl
161
169
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
162
170
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
171
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
163
172
m4_require([_LT_CMD_RELOAD])dnl
164
173
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
174
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
165
175
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
166
176
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
177
m4_require([_LT_WITH_SYSROOT])dnl
167
178
 
168
179
_LT_CONFIG_LIBTOOL_INIT([
169
180
# See if we are running on zsh, and set the options which allow our
179
190
_LT_CHECK_OBJDIR
180
191
 
181
192
m4_require([_LT_TAG_COMPILER])dnl
182
 
_LT_PROG_ECHO_BACKSLASH
183
193
 
184
194
case $host_os in
185
195
aix3*)
193
203
  ;;
194
204
esac
195
205
 
196
 
# Sed substitution that helps us do robust quoting.  It backslashifies
197
 
# metacharacters that are still active within double-quoted strings.
198
 
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
199
 
 
200
 
# Same as above, but do not quote variable references.
201
 
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
202
 
 
203
 
# Sed substitution to delay expansion of an escaped shell variable in a
204
 
# double_quote_subst'ed string.
205
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
206
 
 
207
 
# Sed substitution to delay expansion of an escaped single quote.
208
 
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
209
 
 
210
 
# Sed substitution to avoid accidental globbing in evaled expressions
211
 
no_glob_subst='s/\*/\\\*/g'
212
 
 
213
206
# Global variables:
214
207
ofile=libtool
215
208
can_build_shared=yes
250
243
])# _LT_SETUP
251
244
 
252
245
 
 
246
# _LT_PREPARE_SED_QUOTE_VARS
 
247
# --------------------------
 
248
# Define a few sed substitution that help us do robust quoting.
 
249
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
 
250
[# Backslashify metacharacters that are still active within
 
251
# double-quoted strings.
 
252
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
253
 
 
254
# Same as above, but do not quote variable references.
 
255
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
256
 
 
257
# Sed substitution to delay expansion of an escaped shell variable in a
 
258
# double_quote_subst'ed string.
 
259
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
260
 
 
261
# Sed substitution to delay expansion of an escaped single quote.
 
262
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
263
 
 
264
# Sed substitution to avoid accidental globbing in evaled expressions
 
265
no_glob_subst='s/\*/\\\*/g'
 
266
])
 
267
 
253
268
# _LT_PROG_LTMAIN
254
269
# ---------------
255
270
# Note that this code is called both from `configure', and `config.status'
408
423
# declaration there will have the same value as in `configure'.  VARNAME
409
424
# must have a single quote delimited value for this to work.
410
425
m4_define([_LT_CONFIG_STATUS_DECLARE],
411
 
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
 
426
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
412
427
 
413
428
 
414
429
# _LT_CONFIG_STATUS_DECLARATIONS
418
433
# embedded single quotes properly.  In configure, this macro expands
419
434
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
420
435
#
421
 
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
 
436
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
422
437
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
423
438
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
424
439
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
517
532
LTCFLAGS='$LTCFLAGS'
518
533
compiler='$compiler_DEFAULT'
519
534
 
 
535
# A function that is used when there is no print builtin or printf.
 
536
func_fallback_echo ()
 
537
{
 
538
  eval 'cat <<_LTECHO_EOF
 
539
\$[]1
 
540
_LTECHO_EOF'
 
541
}
 
542
 
520
543
# Quote evaled strings.
521
544
for var in lt_decl_all_varnames([[ \
522
545
]], lt_decl_quote_varnames); do
523
 
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
546
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
524
547
    *[[\\\\\\\`\\"\\\$]]*)
525
 
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
548
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
526
549
      ;;
527
550
    *)
528
551
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
533
556
# Double-quote double-evaled strings.
534
557
for var in lt_decl_all_varnames([[ \
535
558
]], lt_decl_dquote_varnames); do
536
 
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
559
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
537
560
    *[[\\\\\\\`\\"\\\$]]*)
538
 
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
561
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
539
562
      ;;
540
563
    *)
541
564
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
543
566
    esac
544
567
done
545
568
 
546
 
# Fix-up fallback echo if it was mangled by the above quoting rules.
547
 
case \$lt_ECHO in
548
 
*'\\\[$]0 --fallback-echo"')dnl "
549
 
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
550
 
  ;;
551
 
esac
552
 
 
553
569
_LT_OUTPUT_LIBTOOL_INIT
554
570
])
555
571
 
 
572
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
 
573
# ------------------------------------
 
574
# Generate a child script FILE with all initialization necessary to
 
575
# reuse the environment learned by the parent script, and make the
 
576
# file executable.  If COMMENT is supplied, it is inserted after the
 
577
# `#!' sequence but before initialization text begins.  After this
 
578
# macro, additional text can be appended to FILE to form the body of
 
579
# the child script.  The macro ends with non-zero status if the
 
580
# file could not be fully written (such as if the disk is full).
 
581
m4_ifdef([AS_INIT_GENERATED],
 
582
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
 
583
[m4_defun([_LT_GENERATED_FILE_INIT],
 
584
[m4_require([AS_PREPARE])]dnl
 
585
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
 
586
[lt_write_fail=0
 
587
cat >$1 <<_ASEOF || lt_write_fail=1
 
588
#! $SHELL
 
589
# Generated by $as_me.
 
590
$2
 
591
SHELL=\${CONFIG_SHELL-$SHELL}
 
592
export SHELL
 
593
_ASEOF
 
594
cat >>$1 <<\_ASEOF || lt_write_fail=1
 
595
AS_SHELL_SANITIZE
 
596
_AS_PREPARE
 
597
exec AS_MESSAGE_FD>&1
 
598
_ASEOF
 
599
test $lt_write_fail = 0 && chmod +x $1[]dnl
 
600
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
556
601
 
557
602
# LT_OUTPUT
558
603
# ---------
562
607
AC_DEFUN([LT_OUTPUT],
563
608
[: ${CONFIG_LT=./config.lt}
564
609
AC_MSG_NOTICE([creating $CONFIG_LT])
565
 
cat >"$CONFIG_LT" <<_LTEOF
566
 
#! $SHELL
567
 
# Generated by $as_me.
568
 
# Run this file to recreate a libtool stub with the current configuration.
 
610
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
 
611
[# Run this file to recreate a libtool stub with the current configuration.])
569
612
 
 
613
cat >>"$CONFIG_LT" <<\_LTEOF
570
614
lt_cl_silent=false
571
 
SHELL=\${CONFIG_SHELL-$SHELL}
572
 
_LTEOF
573
 
 
574
 
cat >>"$CONFIG_LT" <<\_LTEOF
575
 
AS_SHELL_SANITIZE
576
 
_AS_PREPARE
577
 
 
578
 
exec AS_MESSAGE_FD>&1
579
615
exec AS_MESSAGE_LOG_FD>>config.log
580
616
{
581
617
  echo
601
637
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
602
638
configured by $[0], generated by m4_PACKAGE_STRING.
603
639
 
604
 
Copyright (C) 2008 Free Software Foundation, Inc.
 
640
Copyright (C) 2010 Free Software Foundation, Inc.
605
641
This config.lt script is free software; the Free Software Foundation
606
642
gives unlimited permision to copy, distribute and modify it."
607
643
 
646
682
# appending to config.log, which fails on DOS, as config.log is still kept
647
683
# open by configure.  Here we exec the FD to /dev/null, effectively closing
648
684
# config.log, so it can be properly (re)opened and appended to by config.lt.
649
 
if test "$no_create" != yes; then
650
 
  lt_cl_success=:
651
 
  test "$silent" = yes &&
652
 
    lt_config_lt_args="$lt_config_lt_args --quiet"
653
 
  exec AS_MESSAGE_LOG_FD>/dev/null
654
 
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
655
 
  exec AS_MESSAGE_LOG_FD>>config.log
656
 
  $lt_cl_success || AS_EXIT(1)
657
 
fi
 
685
lt_cl_success=:
 
686
test "$silent" = yes &&
 
687
  lt_config_lt_args="$lt_config_lt_args --quiet"
 
688
exec AS_MESSAGE_LOG_FD>/dev/null
 
689
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
690
exec AS_MESSAGE_LOG_FD>>config.log
 
691
$lt_cl_success || AS_EXIT(1)
658
692
])# LT_OUTPUT
659
693
 
660
694
 
684
718
 
685
719
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
686
720
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 
721
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
687
722
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
688
723
#
689
724
_LT_COPYING
716
751
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
717
752
  # text mode, it properly converts lines to CR/LF.  This bash problem
718
753
  # is reportedly fixed, but why not run on old versions too?
719
 
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
720
 
    || (rm -f "$cfgfile"; exit 1)
721
 
 
722
 
  _LT_PROG_XSI_SHELLFNS
723
 
 
724
 
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
725
 
    || (rm -f "$cfgfile"; exit 1)
726
 
 
727
 
  mv -f "$cfgfile" "$ofile" ||
 
754
  sed '$q' "$ltmain" >> "$cfgfile" \
 
755
     || (rm -f "$cfgfile"; exit 1)
 
756
 
 
757
  _LT_PROG_REPLACE_SHELLFNS
 
758
 
 
759
   mv -f "$cfgfile" "$ofile" ||
728
760
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
729
761
  chmod +x "$ofile"
730
762
],
830
862
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
831
863
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
832
864
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
865
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
833
866
dnl aclocal-1.4 backwards compatibility:
834
867
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
835
868
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
836
869
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
837
870
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
871
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
838
872
 
839
873
 
840
874
# _LT_TAG_COMPILER
939
973
        [lt_cv_ld_exported_symbols_list=no])
940
974
        LDFLAGS="$save_LDFLAGS"
941
975
    ])
 
976
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
 
977
      [lt_cv_ld_force_load=no
 
978
      cat > conftest.c << _LT_EOF
 
979
int forced_loaded() { return 2;}
 
980
_LT_EOF
 
981
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
 
982
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
 
983
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
 
984
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
 
985
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
 
986
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
 
987
      cat > conftest.c << _LT_EOF
 
988
int main() { return 0;}
 
989
_LT_EOF
 
990
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
 
991
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
 
992
      _lt_result=$?
 
993
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
 
994
        lt_cv_ld_force_load=yes
 
995
      else
 
996
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
997
      fi
 
998
        rm -f conftest.err libconftest.a conftest conftest.c
 
999
        rm -rf conftest.dSYM
 
1000
    ])
942
1001
    case $host_os in
943
1002
    rhapsody* | darwin1.[[012]])
944
1003
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
966
1025
    else
967
1026
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
968
1027
    fi
969
 
    if test "$DSYMUTIL" != ":"; then
 
1028
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
970
1029
      _lt_dsymutil='~$DSYMUTIL $lib || :'
971
1030
    else
972
1031
      _lt_dsymutil=
986
1045
  _LT_TAGVAR(hardcode_direct, $1)=no
987
1046
  _LT_TAGVAR(hardcode_automatic, $1)=yes
988
1047
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
989
 
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
1048
  if test "$lt_cv_ld_force_load" = "yes"; then
 
1049
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
1050
  else
 
1051
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
1052
  fi
990
1053
  _LT_TAGVAR(link_all_deplibs, $1)=yes
991
1054
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
992
1055
  case $cc_basename in
994
1057
     *) _lt_dar_can_shared=$GCC ;;
995
1058
  esac
996
1059
  if test "$_lt_dar_can_shared" = "yes"; then
997
 
    output_verbose_link_cmd=echo
 
1060
    output_verbose_link_cmd=func_echo_all
998
1061
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
999
1062
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1000
1063
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1010
1073
  fi
1011
1074
])
1012
1075
 
1013
 
# _LT_SYS_MODULE_PATH_AIX
1014
 
# -----------------------
 
1076
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
 
1077
# ----------------------------------
1015
1078
# Links a minimal program and checks the executable
1016
1079
# for the system default hardcoded library path. In most cases,
1017
1080
# this is /usr/lib:/lib, but when the MPI compilers are used
1018
1081
# the location of the communication and MPI libs are included too.
1019
1082
# If we don't find anything, use the default library path according
1020
1083
# to the aix ld manual.
 
1084
# Store the results from the different compilers for each TAGNAME.
 
1085
# Allow to override them for all tags through lt_cv_aix_libpath.
1021
1086
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1022
1087
[m4_require([_LT_DECL_SED])dnl
1023
 
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1024
 
lt_aix_libpath_sed='
1025
 
    /Import File Strings/,/^$/ {
1026
 
        /^0/ {
1027
 
            s/^0  *\(.*\)$/\1/
1028
 
            p
1029
 
        }
1030
 
    }'
1031
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1032
 
# Check for a 64-bit object if we didn't find anything.
1033
 
if test -z "$aix_libpath"; then
1034
 
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1035
 
fi],[])
1036
 
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
1088
if test "${lt_cv_aix_libpath+set}" = set; then
 
1089
  aix_libpath=$lt_cv_aix_libpath
 
1090
else
 
1091
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
 
1092
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
 
1093
  lt_aix_libpath_sed='[
 
1094
      /Import File Strings/,/^$/ {
 
1095
          /^0/ {
 
1096
              s/^0  *\([^ ]*\) *$/\1/
 
1097
              p
 
1098
          }
 
1099
      }]'
 
1100
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1101
  # Check for a 64-bit object if we didn't find anything.
 
1102
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
1103
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1104
  fi],[])
 
1105
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
1106
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
 
1107
  fi
 
1108
  ])
 
1109
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
 
1110
fi
1037
1111
])# _LT_SYS_MODULE_PATH_AIX
1038
1112
 
1039
1113
 
1040
1114
# _LT_SHELL_INIT(ARG)
1041
1115
# -------------------
1042
1116
m4_define([_LT_SHELL_INIT],
1043
 
[ifdef([AC_DIVERSION_NOTICE],
1044
 
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1045
 
         [AC_DIVERT_PUSH(NOTICE)])
1046
 
$1
1047
 
AC_DIVERT_POP
1048
 
])# _LT_SHELL_INIT
 
1117
[m4_divert_text([M4SH-INIT], [$1
 
1118
])])# _LT_SHELL_INIT
 
1119
 
1049
1120
 
1050
1121
 
1051
1122
# _LT_PROG_ECHO_BACKSLASH
1052
1123
# -----------------------
1053
 
# Add some code to the start of the generated configure script which
1054
 
# will find an echo command which doesn't interpret backslashes.
 
1124
# Find how we can fake an echo command that does not interpret backslash.
 
1125
# In particular, with Autoconf 2.60 or later we add some code to the start
 
1126
# of the generated configure script which will find a shell with a builtin
 
1127
# printf (which we can use as an echo command).
1055
1128
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1056
 
[_LT_SHELL_INIT([
1057
 
# Check that we are running under the correct shell.
1058
 
SHELL=${CONFIG_SHELL-/bin/sh}
1059
 
 
1060
 
case X$lt_ECHO in
1061
 
X*--fallback-echo)
1062
 
  # Remove one level of quotation (which was required for Make).
1063
 
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1064
 
  ;;
 
1129
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
1130
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
1131
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
1132
 
 
1133
AC_MSG_CHECKING([how to print strings])
 
1134
# Test print first, because it will be a builtin if present.
 
1135
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
 
1136
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
 
1137
  ECHO='print -r --'
 
1138
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
 
1139
  ECHO='printf %s\n'
 
1140
else
 
1141
  # Use this function as a fallback that always works.
 
1142
  func_fallback_echo ()
 
1143
  {
 
1144
    eval 'cat <<_LTECHO_EOF
 
1145
$[]1
 
1146
_LTECHO_EOF'
 
1147
  }
 
1148
  ECHO='func_fallback_echo'
 
1149
fi
 
1150
 
 
1151
# func_echo_all arg...
 
1152
# Invoke $ECHO with all args, space-separated.
 
1153
func_echo_all ()
 
1154
{
 
1155
    $ECHO "$*" 
 
1156
}
 
1157
 
 
1158
case "$ECHO" in
 
1159
  printf*) AC_MSG_RESULT([printf]) ;;
 
1160
  print*) AC_MSG_RESULT([print -r]) ;;
 
1161
  *) AC_MSG_RESULT([cat]) ;;
1065
1162
esac
1066
1163
 
1067
 
ECHO=${lt_ECHO-echo}
1068
 
if test "X[$]1" = X--no-reexec; then
1069
 
  # Discard the --no-reexec flag, and continue.
1070
 
  shift
1071
 
elif test "X[$]1" = X--fallback-echo; then
1072
 
  # Avoid inline document here, it may be left over
1073
 
  :
1074
 
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1075
 
  # Yippee, $ECHO works!
1076
 
  :
1077
 
else
1078
 
  # Restart under the correct shell.
1079
 
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1080
 
fi
1081
 
 
1082
 
if test "X[$]1" = X--fallback-echo; then
1083
 
  # used as fallback echo
1084
 
  shift
1085
 
  cat <<_LT_EOF
1086
 
[$]*
1087
 
_LT_EOF
1088
 
  exit 0
1089
 
fi
1090
 
 
1091
 
# The HP-UX ksh and POSIX shell print the target directory to stdout
1092
 
# if CDPATH is set.
1093
 
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1094
 
 
1095
 
if test -z "$lt_ECHO"; then
1096
 
  if test "X${echo_test_string+set}" != Xset; then
1097
 
    # find a string as large as possible, as long as the shell can cope with it
1098
 
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1099
 
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1100
 
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1101
 
         { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1102
 
      then
1103
 
        break
1104
 
      fi
1105
 
    done
1106
 
  fi
1107
 
 
1108
 
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1109
 
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1110
 
     test "X$echo_testing_string" = "X$echo_test_string"; then
1111
 
    :
1112
 
  else
1113
 
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1114
 
    # backslashes.  This makes it impossible to quote backslashes using
1115
 
    #   echo "$something" | sed 's/\\/\\\\/g'
1116
 
    #
1117
 
    # So, first we look for a working echo in the user's PATH.
1118
 
 
1119
 
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1120
 
    for dir in $PATH /usr/ucb; do
1121
 
      IFS="$lt_save_ifs"
1122
 
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1123
 
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1124
 
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1125
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
1126
 
        ECHO="$dir/echo"
1127
 
        break
1128
 
      fi
1129
 
    done
1130
 
    IFS="$lt_save_ifs"
1131
 
 
1132
 
    if test "X$ECHO" = Xecho; then
1133
 
      # We didn't find a better echo, so look for alternatives.
1134
 
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1135
 
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1136
 
         test "X$echo_testing_string" = "X$echo_test_string"; then
1137
 
        # This shell has a builtin print -r that does the trick.
1138
 
        ECHO='print -r'
1139
 
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1140
 
           test "X$CONFIG_SHELL" != X/bin/ksh; then
1141
 
        # If we have ksh, try running configure again with it.
1142
 
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1143
 
        export ORIGINAL_CONFIG_SHELL
1144
 
        CONFIG_SHELL=/bin/ksh
1145
 
        export CONFIG_SHELL
1146
 
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1147
 
      else
1148
 
        # Try using printf.
1149
 
        ECHO='printf %s\n'
1150
 
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1151
 
           echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1152
 
           test "X$echo_testing_string" = "X$echo_test_string"; then
1153
 
          # Cool, printf works
1154
 
          :
1155
 
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1156
 
             test "X$echo_testing_string" = 'X\t' &&
1157
 
             echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1158
 
             test "X$echo_testing_string" = "X$echo_test_string"; then
1159
 
          CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1160
 
          export CONFIG_SHELL
1161
 
          SHELL="$CONFIG_SHELL"
1162
 
          export SHELL
1163
 
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1164
 
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1165
 
             test "X$echo_testing_string" = 'X\t' &&
1166
 
             echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1167
 
             test "X$echo_testing_string" = "X$echo_test_string"; then
1168
 
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1169
 
        else
1170
 
          # maybe with a smaller string...
1171
 
          prev=:
1172
 
 
1173
 
          for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1174
 
            if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1175
 
            then
1176
 
              break
1177
 
            fi
1178
 
            prev="$cmd"
1179
 
          done
1180
 
 
1181
 
          if test "$prev" != 'sed 50q "[$]0"'; then
1182
 
            echo_test_string=`eval $prev`
1183
 
            export echo_test_string
1184
 
            exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1185
 
          else
1186
 
            # Oops.  We lost completely, so just stick with echo.
1187
 
            ECHO=echo
1188
 
          fi
1189
 
        fi
1190
 
      fi
1191
 
    fi
1192
 
  fi
1193
 
fi
1194
 
 
1195
 
# Copy echo and quote the copy suitably for passing to libtool from
1196
 
# the Makefile, instead of quoting the original, which is used later.
1197
 
lt_ECHO=$ECHO
1198
 
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1199
 
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1200
 
fi
1201
 
 
1202
 
AC_SUBST(lt_ECHO)
1203
 
])
 
1164
m4_ifdef([_AS_DETECT_SUGGESTED],
 
1165
[_AS_DETECT_SUGGESTED([
 
1166
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
 
1167
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
1168
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
1169
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
1170
    PATH=/empty FPATH=/empty; export PATH FPATH
 
1171
    test "X`printf %s $ECHO`" = "X$ECHO" \
 
1172
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
1173
 
1204
1174
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1205
 
_LT_DECL([], [ECHO], [1],
1206
 
    [An echo program that does not interpret backslashes])
 
1175
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1207
1176
])# _LT_PROG_ECHO_BACKSLASH
1208
1177
 
1209
1178
 
 
1179
# _LT_WITH_SYSROOT
 
1180
# ----------------
 
1181
AC_DEFUN([_LT_WITH_SYSROOT],
 
1182
[AC_MSG_CHECKING([for sysroot])
 
1183
AC_ARG_WITH([sysroot],
 
1184
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
 
1185
                        (or the compiler's sysroot if not specified).],
 
1186
[], [with_sysroot=no])
 
1187
 
 
1188
dnl lt_sysroot will always be passed unquoted.  We quote it here
 
1189
dnl in case the user passed a directory name.
 
1190
lt_sysroot=
 
1191
case ${with_sysroot} in #(
 
1192
 yes)
 
1193
   if test "$GCC" = yes; then
 
1194
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
 
1195
   fi
 
1196
   ;; #(
 
1197
 /*)
 
1198
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
 
1199
   ;; #(
 
1200
 no|'')
 
1201
   ;; #(
 
1202
 *)
 
1203
   AC_MSG_RESULT([${with_sysroot}])
 
1204
   AC_MSG_ERROR([The sysroot must be an absolute path.])
 
1205
   ;;
 
1206
esac
 
1207
 
 
1208
 AC_MSG_RESULT([${lt_sysroot:-no}])
 
1209
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
 
1210
[dependent libraries, and in which our libraries should be installed.])])
 
1211
 
1210
1212
# _LT_ENABLE_LOCK
1211
1213
# ---------------
1212
1214
m4_defun([_LT_ENABLE_LOCK],
1235
1237
  ;;
1236
1238
*-*-irix6*)
1237
1239
  # Find out which ABI we are using.
1238
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
1240
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1239
1241
  if AC_TRY_EVAL(ac_compile); then
1240
1242
    if test "$lt_cv_prog_gnu_ld" = yes; then
1241
1243
      case `/usr/bin/file conftest.$ac_objext` in
1353
1355
])# _LT_ENABLE_LOCK
1354
1356
 
1355
1357
 
 
1358
# _LT_PROG_AR
 
1359
# -----------
 
1360
m4_defun([_LT_PROG_AR],
 
1361
[AC_CHECK_TOOLS(AR, [ar], false)
 
1362
: ${AR=ar}
 
1363
: ${AR_FLAGS=cru}
 
1364
_LT_DECL([], [AR], [1], [The archiver])
 
1365
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
 
1366
 
 
1367
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
 
1368
  [lt_cv_ar_at_file=no
 
1369
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
 
1370
     [echo conftest.$ac_objext > conftest.lst
 
1371
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
 
1372
      AC_TRY_EVAL([lt_ar_try])
 
1373
      if test "$ac_status" -eq 0; then
 
1374
        # Ensure the archiver fails upon bogus file names.
 
1375
        rm -f conftest.$ac_objext libconftest.a
 
1376
        AC_TRY_EVAL([lt_ar_try])
 
1377
        if test "$ac_status" -ne 0; then
 
1378
          lt_cv_ar_at_file=@
 
1379
        fi
 
1380
      fi
 
1381
      rm -f conftest.* libconftest.a
 
1382
     ])
 
1383
  ])
 
1384
 
 
1385
if test "x$lt_cv_ar_at_file" = xno; then
 
1386
  archiver_list_spec=
 
1387
else
 
1388
  archiver_list_spec=$lt_cv_ar_at_file
 
1389
fi
 
1390
_LT_DECL([], [archiver_list_spec], [1],
 
1391
  [How to feed a file listing to the archiver])
 
1392
])# _LT_PROG_AR
 
1393
 
 
1394
 
1356
1395
# _LT_CMD_OLD_ARCHIVE
1357
1396
# -------------------
1358
1397
m4_defun([_LT_CMD_OLD_ARCHIVE],
1359
 
[AC_CHECK_TOOL(AR, ar, false)
1360
 
test -z "$AR" && AR=ar
1361
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
1362
 
_LT_DECL([], [AR], [1], [The archiver])
1363
 
_LT_DECL([], [AR_FLAGS], [1])
 
1398
[_LT_PROG_AR
1364
1399
 
1365
1400
AC_CHECK_TOOL(STRIP, strip, :)
1366
1401
test -z "$STRIP" && STRIP=:
1387
1422
  esac
1388
1423
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1389
1424
fi
 
1425
 
 
1426
case $host_os in
 
1427
  darwin*)
 
1428
    lock_old_archive_extraction=yes ;;
 
1429
  *)
 
1430
    lock_old_archive_extraction=no ;;
 
1431
esac
1390
1432
_LT_DECL([], [old_postinstall_cmds], [2])
1391
1433
_LT_DECL([], [old_postuninstall_cmds], [2])
1392
1434
_LT_TAGDECL([], [old_archive_cmds], [2],
1393
1435
    [Commands used to build an old-style archive])
 
1436
_LT_DECL([], [lock_old_archive_extraction], [0],
 
1437
    [Whether to use a lock for old archive extraction])
1394
1438
])# _LT_CMD_OLD_ARCHIVE
1395
1439
 
1396
1440
 
1415
1459
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1416
1460
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1417
1461
   -e 's:$: $lt_compiler_flag:'`
1418
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1462
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1419
1463
   (eval "$lt_compile" 2>conftest.err)
1420
1464
   ac_status=$?
1421
1465
   cat conftest.err >&AS_MESSAGE_LOG_FD
1422
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1466
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1423
1467
   if (exit $ac_status) && test -s "$ac_outfile"; then
1424
1468
     # The compiler can only warn and ignore the option if not recognized
1425
1469
     # So say no if there are warnings other than the usual output.
1426
 
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
1470
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1427
1471
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1428
1472
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1429
1473
       $2=yes
1463
1507
     if test -s conftest.err; then
1464
1508
       # Append any errors to the config.log.
1465
1509
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1466
 
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
1510
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1467
1511
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1468
1512
       if diff conftest.exp conftest.er2 >/dev/null; then
1469
1513
         $2=yes
1526
1570
    lt_cv_sys_max_cmd_len=8192;
1527
1571
    ;;
1528
1572
 
 
1573
  mint*)
 
1574
    # On MiNT this can take a long time and run out of memory.
 
1575
    lt_cv_sys_max_cmd_len=8192;
 
1576
    ;;
 
1577
 
1529
1578
  amigaos*)
1530
1579
    # On AmigaOS with pdksh, this test takes hours, literally.
1531
1580
    # So we just punt and use a minimum line length of 8192.
1590
1639
      # If test is not a shell built-in, we'll probably end up computing a
1591
1640
      # maximum length that is only half of the actual maximum length, but
1592
1641
      # we can't tell.
1593
 
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1594
 
                 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
 
1642
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
 
1643
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1595
1644
              test $i != 17 # 1/2 MB should be enough
1596
1645
      do
1597
1646
        i=`expr $i + 1`
1642
1691
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1643
1692
  lt_status=$lt_dlunknown
1644
1693
  cat > conftest.$ac_ext <<_LT_EOF
1645
 
[#line __oline__ "configure"
 
1694
[#line $LINENO "configure"
1646
1695
#include "confdefs.h"
1647
1696
 
1648
1697
#if HAVE_DLFCN_H
1683
1732
#  endif
1684
1733
#endif
1685
1734
 
1686
 
void fnord() { int i=42;}
 
1735
/* When -fvisbility=hidden is used, assume the code has been annotated
 
1736
   correspondingly for the symbols needed.  */
 
1737
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 
1738
int fnord () __attribute__((visibility("default")));
 
1739
#endif
 
1740
 
 
1741
int fnord () { return 42; }
1687
1742
int main ()
1688
1743
{
1689
1744
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1692
1747
  if (self)
1693
1748
    {
1694
1749
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1695
 
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
1750
      else
 
1751
        {
 
1752
          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
 
1753
          else puts (dlerror ());
 
1754
        }
1696
1755
      /* dlclose (self); */
1697
1756
    }
1698
1757
  else
1868
1927
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1869
1928
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1870
1929
   -e 's:$: $lt_compiler_flag:'`
1871
 
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1930
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1872
1931
   (eval "$lt_compile" 2>out/conftest.err)
1873
1932
   ac_status=$?
1874
1933
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1875
 
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1934
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1876
1935
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1877
1936
   then
1878
1937
     # The compiler can only warn and ignore the option if not recognized
1879
1938
     # So say no if there are warnings
1880
 
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
1939
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1881
1940
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1882
1941
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1883
1942
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2036
2095
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2037
2096
m4_require([_LT_DECL_OBJDUMP])dnl
2038
2097
m4_require([_LT_DECL_SED])dnl
 
2098
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2039
2099
AC_MSG_CHECKING([dynamic linker characteristics])
2040
2100
m4_if([$1],
2041
2101
        [], [
2044
2104
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2045
2105
    *) lt_awk_arg="/^libraries:/" ;;
2046
2106
  esac
2047
 
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2048
 
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
 
2107
  case $host_os in
 
2108
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
 
2109
    *) lt_sed_strip_eq="s,=/,/,g" ;;
 
2110
  esac
 
2111
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
 
2112
  case $lt_search_path_spec in
 
2113
  *\;*)
2049
2114
    # if the path contains ";" then we assume it to be the separator
2050
2115
    # otherwise default to the standard path separator (i.e. ":") - it is
2051
2116
    # assumed that no part of a normal pathname contains ";" but that should
2052
2117
    # okay in the real world where ";" in dirpaths is itself problematic.
2053
 
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2054
 
  else
2055
 
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2056
 
  fi
 
2118
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
 
2119
    ;;
 
2120
  *)
 
2121
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
 
2122
    ;;
 
2123
  esac
2057
2124
  # Ok, now we have the path, separated by spaces, we can step through it
2058
2125
  # and add multilib dir if necessary.
2059
2126
  lt_tmp_lt_search_path_spec=
2066
2133
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2067
2134
    fi
2068
2135
  done
2069
 
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
 
2136
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2070
2137
BEGIN {RS=" "; FS="/|\n";} {
2071
2138
  lt_foo="";
2072
2139
  lt_count=0;
2086
2153
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2087
2154
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2088
2155
}'`
2089
 
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 
2156
  # AWK program above erroneously prepends '/' to C:/dos/paths
 
2157
  # for these hosts.
 
2158
  case $host_os in
 
2159
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
 
2160
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
 
2161
  esac
 
2162
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2090
2163
else
2091
2164
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2092
2165
fi])
2174
2247
  m68k)
2175
2248
    library_names_spec='$libname.ixlibrary $libname.a'
2176
2249
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2177
 
    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'
 
2250
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
2178
2251
    ;;
2179
2252
  esac
2180
2253
  ;;
2205
2278
  need_version=no
2206
2279
  need_lib_prefix=no
2207
2280
 
2208
 
  case $GCC,$host_os in
2209
 
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
 
2281
  case $GCC,$cc_basename in
 
2282
  yes,*)
 
2283
    # gcc
2210
2284
    library_names_spec='$libname.dll.a'
2211
2285
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2212
2286
    postinstall_cmds='base_file=`basename \${file}`~
2227
2301
    cygwin*)
2228
2302
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2229
2303
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2230
 
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
2304
m4_if([$1], [],[
 
2305
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2231
2306
      ;;
2232
2307
    mingw* | cegcc*)
2233
2308
      # MinGW DLLs use traditional 'lib' prefix
2234
2309
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235
 
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2236
 
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2237
 
        # It is most probably a Windows format PATH printed by
2238
 
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2239
 
        # path with ; separators, and with drive letters. We can handle the
2240
 
        # drive letters (cygwin fileutils understands them), so leave them,
2241
 
        # especially as we might pass files found there to a mingw objdump,
2242
 
        # which wouldn't understand a cygwinified path. Ahh.
2243
 
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2244
 
      else
2245
 
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2246
 
      fi
2247
2310
      ;;
2248
2311
    pw32*)
2249
2312
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2250
2313
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251
2314
      ;;
2252
2315
    esac
 
2316
    dynamic_linker='Win32 ld.exe'
 
2317
    ;;
 
2318
 
 
2319
  *,cl*)
 
2320
    # Native MSVC
 
2321
    libname_spec='$name'
 
2322
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2323
    library_names_spec='${libname}.dll.lib'
 
2324
 
 
2325
    case $build_os in
 
2326
    mingw*)
 
2327
      sys_lib_search_path_spec=
 
2328
      lt_save_ifs=$IFS
 
2329
      IFS=';'
 
2330
      for lt_path in $LIB
 
2331
      do
 
2332
        IFS=$lt_save_ifs
 
2333
        # Let DOS variable expansion print the short 8.3 style file name.
 
2334
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
 
2335
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
 
2336
      done
 
2337
      IFS=$lt_save_ifs
 
2338
      # Convert to MSYS style.
 
2339
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
 
2340
      ;;
 
2341
    cygwin*)
 
2342
      # Convert to unix form, then to dos form, then back to unix form
 
2343
      # but this time dos style (no spaces!) so that the unix form looks
 
2344
      # like /cygdrive/c/PROGRA~1:/cygdr...
 
2345
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
 
2346
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
 
2347
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
2348
      ;;
 
2349
    *)
 
2350
      sys_lib_search_path_spec="$LIB"
 
2351
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
2352
        # It is most probably a Windows format PATH.
 
2353
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
2354
      else
 
2355
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
2356
      fi
 
2357
      # FIXME: find the short name or the path components, as spaces are
 
2358
      # common. (e.g. "Program Files" -> "PROGRA~1")
 
2359
      ;;
 
2360
    esac
 
2361
 
 
2362
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
2363
    postinstall_cmds='base_file=`basename \${file}`~
 
2364
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
2365
      dldir=$destdir/`dirname \$dlpath`~
 
2366
      test -d \$dldir || mkdir -p \$dldir~
 
2367
      $install_prog $dir/$dlname \$dldir/$dlname'
 
2368
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
2369
      dlpath=$dir/\$dldll~
 
2370
       $RM \$dlpath'
 
2371
    shlibpath_overrides_runpath=yes
 
2372
    dynamic_linker='Win32 link.exe'
2253
2373
    ;;
2254
2374
 
2255
2375
  *)
 
2376
    # Assume MSVC wrapper
2256
2377
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
2378
    dynamic_linker='Win32 ld.exe'
2257
2379
    ;;
2258
2380
  esac
2259
 
  dynamic_linker='Win32 ld.exe'
2260
2381
  # FIXME: first we should search . and the directory the executable is in
2261
2382
  shlibpath_var=PATH
2262
2383
  ;;
2343
2464
  hardcode_into_libs=yes
2344
2465
  ;;
2345
2466
 
 
2467
haiku*)
 
2468
  version_type=linux
 
2469
  need_lib_prefix=no
 
2470
  need_version=no
 
2471
  dynamic_linker="$host_os runtime_loader"
 
2472
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
2473
  soname_spec='${libname}${release}${shared_ext}$major'
 
2474
  shlibpath_var=LIBRARY_PATH
 
2475
  shlibpath_overrides_runpath=yes
 
2476
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
 
2477
  hardcode_into_libs=yes
 
2478
  ;;
 
2479
 
2346
2480
hpux9* | hpux10* | hpux11*)
2347
2481
  # Give a soname corresponding to the major version so that dld.sl refuses to
2348
2482
  # link against other versions.
2385
2519
    soname_spec='${libname}${release}${shared_ext}$major'
2386
2520
    ;;
2387
2521
  esac
2388
 
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
2522
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2389
2523
  postinstall_cmds='chmod 555 $lib'
 
2524
  # or fails outright, so override atomically:
 
2525
  install_override_mode=555
2390
2526
  ;;
2391
2527
 
2392
2528
interix[[3-9]]*)
2444
2580
  ;;
2445
2581
 
2446
2582
# This must be Linux ELF.
2447
 
linux* | k*bsd*-gnu)
 
2583
linux* | k*bsd*-gnu | kopensolaris*-gnu)
2448
2584
  version_type=linux
2449
2585
  need_lib_prefix=no
2450
2586
  need_version=no
2453
2589
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2454
2590
  shlibpath_var=LD_LIBRARY_PATH
2455
2591
  shlibpath_overrides_runpath=no
 
2592
 
2456
2593
  # Some binutils ld are patched to set DT_RUNPATH
2457
 
  save_LDFLAGS=$LDFLAGS
2458
 
  save_libdir=$libdir
2459
 
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2460
 
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2461
 
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2462
 
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2463
 
       [shlibpath_overrides_runpath=yes])])
2464
 
  LDFLAGS=$save_LDFLAGS
2465
 
  libdir=$save_libdir
 
2594
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
 
2595
    [lt_cv_shlibpath_overrides_runpath=no
 
2596
    save_LDFLAGS=$LDFLAGS
 
2597
    save_libdir=$libdir
 
2598
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
2599
         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
2600
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
2601
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
2602
         [lt_cv_shlibpath_overrides_runpath=yes])])
 
2603
    LDFLAGS=$save_LDFLAGS
 
2604
    libdir=$save_libdir
 
2605
    ])
 
2606
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2466
2607
 
2467
2608
  # This implies no fast_install, which is unacceptable.
2468
2609
  # Some rework will be needed to allow for fast_install
2471
2612
 
2472
2613
  # Append ld.so.conf contents to the search path
2473
2614
  if test -f /etc/ld.so.conf; then
2474
 
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
2615
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2475
2616
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2476
2617
  fi
2477
2618
 
2704
2845
    The last name is the one that the linker finds with -lNAME]])
2705
2846
_LT_DECL([], [soname_spec], [1],
2706
2847
    [[The coded name of the library, if different from the real name]])
 
2848
_LT_DECL([], [install_override_mode], [1],
 
2849
    [Permission mode override for installation of shared libraries])
2707
2850
_LT_DECL([], [postinstall_cmds], [2],
2708
2851
    [Command to use after installation of a shared archive])
2709
2852
_LT_DECL([], [postuninstall_cmds], [2],
2816
2959
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2817
2960
m4_require([_LT_DECL_SED])dnl
2818
2961
m4_require([_LT_DECL_EGREP])dnl
 
2962
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
2819
2963
 
2820
2964
AC_ARG_WITH([gnu-ld],
2821
2965
    [AS_HELP_STRING([--with-gnu-ld],
2937
3081
esac
2938
3082
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2939
3083
case $host_os in
 
3084
  cygwin* | mingw* | pw32* | cegcc*)
 
3085
    if test "$GCC" != yes; then
 
3086
      reload_cmds=false
 
3087
    fi
 
3088
    ;;
2940
3089
  darwin*)
2941
3090
    if test "$GCC" = yes; then
2942
3091
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2945
3094
    fi
2946
3095
    ;;
2947
3096
esac
2948
 
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2949
 
_LT_DECL([], [reload_cmds], [2])dnl
 
3097
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
3098
_LT_TAGDECL([], [reload_cmds], [2])dnl
2950
3099
])# _LT_CMD_RELOAD
2951
3100
 
2952
3101
 
2998
3147
  # Base MSYS/MinGW do not provide the 'file' command needed by
2999
3148
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3000
3149
  # unless we find 'file', for example because we are cross-compiling.
3001
 
  if ( file / ) >/dev/null 2>&1; then
 
3150
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
 
3151
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3002
3152
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3003
3153
    lt_cv_file_magic_cmd='func_win32_libid'
3004
3154
  else
3005
 
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
3155
    # Keep this pattern in sync with the one in func_win32_libid.
 
3156
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3006
3157
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3007
3158
  fi
3008
3159
  ;;
3009
3160
 
3010
 
cegcc)
 
3161
cegcc*)
3011
3162
  # use the weaker test based on 'objdump'. See mingw*.
3012
3163
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3013
3164
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3037
3188
  lt_cv_deplibs_check_method=pass_all
3038
3189
  ;;
3039
3190
 
 
3191
haiku*)
 
3192
  lt_cv_deplibs_check_method=pass_all
 
3193
  ;;
 
3194
 
3040
3195
hpux10.20* | hpux11*)
3041
3196
  lt_cv_file_magic_cmd=/usr/bin/file
3042
3197
  case $host_cpu in
3045
3200
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3046
3201
    ;;
3047
3202
  hppa*64*)
3048
 
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
3203
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3049
3204
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3050
3205
    ;;
3051
3206
  *)
3052
 
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
3207
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3053
3208
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3054
3209
    ;;
3055
3210
  esac
3071
3226
  ;;
3072
3227
 
3073
3228
# This must be Linux ELF.
3074
 
linux* | k*bsd*-gnu)
 
3229
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3075
3230
  lt_cv_deplibs_check_method=pass_all
3076
3231
  ;;
3077
3232
 
3149
3304
  ;;
3150
3305
esac
3151
3306
])
 
3307
 
 
3308
file_magic_glob=
 
3309
want_nocaseglob=no
 
3310
if test "$build" = "$host"; then
 
3311
  case $host_os in
 
3312
  mingw* | pw32*)
 
3313
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
 
3314
      want_nocaseglob=yes
 
3315
    else
 
3316
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
 
3317
    fi
 
3318
    ;;
 
3319
  esac
 
3320
fi
 
3321
 
3152
3322
file_magic_cmd=$lt_cv_file_magic_cmd
3153
3323
deplibs_check_method=$lt_cv_deplibs_check_method
3154
3324
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3156
3326
_LT_DECL([], [deplibs_check_method], [1],
3157
3327
    [Method to check whether dependent libraries are shared objects])
3158
3328
_LT_DECL([], [file_magic_cmd], [1],
3159
 
    [Command to use when deplibs_check_method == "file_magic"])
 
3329
    [Command to use when deplibs_check_method = "file_magic"])
 
3330
_LT_DECL([], [file_magic_glob], [1],
 
3331
    [How to find potential files when deplibs_check_method = "file_magic"])
 
3332
_LT_DECL([], [want_nocaseglob], [1],
 
3333
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3160
3334
])# _LT_CHECK_MAGIC_METHOD
3161
3335
 
3162
3336
 
3213
3387
  NM="$lt_cv_path_NM"
3214
3388
else
3215
3389
  # Didn't find any BSD compatible name lister, look for dumpbin.
3216
 
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
 
3390
  if test -n "$DUMPBIN"; then :
 
3391
    # Let the user override the test.
 
3392
  else
 
3393
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
 
3394
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
 
3395
    *COFF*)
 
3396
      DUMPBIN="$DUMPBIN -symbols"
 
3397
      ;;
 
3398
    *)
 
3399
      DUMPBIN=:
 
3400
      ;;
 
3401
    esac
 
3402
  fi
3217
3403
  AC_SUBST([DUMPBIN])
3218
3404
  if test "$DUMPBIN" != ":"; then
3219
3405
    NM="$DUMPBIN"
3226
3412
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3227
3413
  [lt_cv_nm_interface="BSD nm"
3228
3414
  echo "int some_variable = 0;" > conftest.$ac_ext
3229
 
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
3415
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3230
3416
  (eval "$ac_compile" 2>conftest.err)
3231
3417
  cat conftest.err >&AS_MESSAGE_LOG_FD
3232
 
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
3418
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3233
3419
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3234
3420
  cat conftest.err >&AS_MESSAGE_LOG_FD
3235
 
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
 
3421
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3236
3422
  cat conftest.out >&AS_MESSAGE_LOG_FD
3237
3423
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3238
3424
    lt_cv_nm_interface="MS dumpbin"
3247
3433
dnl AC_DEFUN([AM_PROG_NM], [])
3248
3434
dnl AC_DEFUN([AC_PROG_NM], [])
3249
3435
 
 
3436
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
3437
# --------------------------------
 
3438
# how to determine the name of the shared library
 
3439
# associated with a specific link library.
 
3440
#  -- PORTME fill in with the dynamic library characteristics
 
3441
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
 
3442
[m4_require([_LT_DECL_EGREP])
 
3443
m4_require([_LT_DECL_OBJDUMP])
 
3444
m4_require([_LT_DECL_DLLTOOL])
 
3445
AC_CACHE_CHECK([how to associate runtime and link libraries],
 
3446
lt_cv_sharedlib_from_linklib_cmd,
 
3447
[lt_cv_sharedlib_from_linklib_cmd='unknown'
 
3448
 
 
3449
case $host_os in
 
3450
cygwin* | mingw* | pw32* | cegcc*)
 
3451
  # two different shell functions defined in ltmain.sh
 
3452
  # decide which to use based on capabilities of $DLLTOOL
 
3453
  case `$DLLTOOL --help 2>&1` in
 
3454
  *--identify-strict*)
 
3455
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
 
3456
    ;;
 
3457
  *)
 
3458
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
 
3459
    ;;
 
3460
  esac
 
3461
  ;;
 
3462
*)
 
3463
  # fallback: assume linklib IS sharedlib
 
3464
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
 
3465
  ;;
 
3466
esac
 
3467
])
 
3468
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
 
3469
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
3470
 
 
3471
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
 
3472
    [Command to associate shared and link libraries])
 
3473
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
3474
 
 
3475
 
 
3476
# _LT_PATH_MANIFEST_TOOL
 
3477
# ----------------------
 
3478
# locate the manifest tool
 
3479
m4_defun([_LT_PATH_MANIFEST_TOOL],
 
3480
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
 
3481
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
 
3482
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
 
3483
  [lt_cv_path_mainfest_tool=no
 
3484
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
 
3485
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
 
3486
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
3487
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
 
3488
    lt_cv_path_mainfest_tool=yes
 
3489
  fi
 
3490
  rm -f conftest*])
 
3491
if test "x$lt_cv_path_mainfest_tool" != xyes; then
 
3492
  MANIFEST_TOOL=:
 
3493
fi
 
3494
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 
3495
])# _LT_PATH_MANIFEST_TOOL
 
3496
 
3250
3497
 
3251
3498
# LT_LIB_M
3252
3499
# --------
3255
3502
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3256
3503
LIBM=
3257
3504
case $host in
3258
 
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
3505
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3259
3506
  # These system don't have libm, or don't need it
3260
3507
  ;;
3261
3508
*-ncr-sysv4.3*)
3283
3530
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3284
3531
 
3285
3532
if test "$GCC" = yes; then
3286
 
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
3533
  case $cc_basename in
 
3534
  nvcc*)
 
3535
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
 
3536
  *)
 
3537
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
 
3538
  esac
3287
3539
 
3288
3540
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3289
3541
    lt_cv_prog_compiler_rtti_exceptions,
3300
3552
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3301
3553
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3302
3554
AC_REQUIRE([AC_PROG_CC])dnl
 
3555
AC_REQUIRE([AC_PROG_AWK])dnl
3303
3556
AC_REQUIRE([LT_PATH_NM])dnl
3304
3557
AC_REQUIRE([LT_PATH_LD])dnl
3305
3558
m4_require([_LT_DECL_SED])dnl
3367
3620
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3368
3621
 
3369
3622
# Transform an extracted symbol line into symbol name and symbol address
3370
 
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3371
 
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
3623
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
3624
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
3372
3625
 
3373
3626
# Handle CRLF in mingw tool chain
3374
3627
opt_cr=
3404
3657
  else
3405
3658
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3406
3659
  fi
 
3660
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3407
3661
 
3408
3662
  # Check to see that the pipe works correctly.
3409
3663
  pipe_works=no
3425
3679
  if AC_TRY_EVAL(ac_compile); then
3426
3680
    # Now try to grab the symbols.
3427
3681
    nlist=conftest.nm
3428
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
3682
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3429
3683
      # Try sorting and uniquifying the output.
3430
3684
      if sort "$nlist" | uniq > "$nlist"T; then
3431
3685
        mv -f "$nlist"T "$nlist"
3437
3691
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3438
3692
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3439
3693
          cat <<_LT_EOF > conftest.$ac_ext
 
3694
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
 
3695
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
 
3696
/* DATA imports from DLLs on WIN32 con't be const, because runtime
 
3697
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
 
3698
# define LT@&t@_DLSYM_CONST
 
3699
#elif defined(__osf__)
 
3700
/* This system does not cope well with relocations in const data.  */
 
3701
# define LT@&t@_DLSYM_CONST
 
3702
#else
 
3703
# define LT@&t@_DLSYM_CONST const
 
3704
#endif
 
3705
 
3440
3706
#ifdef __cplusplus
3441
3707
extern "C" {
3442
3708
#endif
3448
3714
          cat <<_LT_EOF >> conftest.$ac_ext
3449
3715
 
3450
3716
/* The mapping between symbol names and symbols.  */
3451
 
const struct {
 
3717
LT@&t@_DLSYM_CONST struct {
3452
3718
  const char *name;
3453
3719
  void       *address;
3454
3720
}
3474
3740
_LT_EOF
3475
3741
          # Now try linking the two files.
3476
3742
          mv conftest.$ac_objext conftstm.$ac_objext
3477
 
          lt_save_LIBS="$LIBS"
3478
 
          lt_save_CFLAGS="$CFLAGS"
 
3743
          lt_globsym_save_LIBS=$LIBS
 
3744
          lt_globsym_save_CFLAGS=$CFLAGS
3479
3745
          LIBS="conftstm.$ac_objext"
3480
3746
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3481
3747
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3482
3748
            pipe_works=yes
3483
3749
          fi
3484
 
          LIBS="$lt_save_LIBS"
3485
 
          CFLAGS="$lt_save_CFLAGS"
 
3750
          LIBS=$lt_globsym_save_LIBS
 
3751
          CFLAGS=$lt_globsym_save_CFLAGS
3486
3752
        else
3487
3753
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3488
3754
        fi
3515
3781
  AC_MSG_RESULT(ok)
3516
3782
fi
3517
3783
 
 
3784
# Response file support.
 
3785
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
3786
  nm_file_list_spec='@'
 
3787
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
 
3788
  nm_file_list_spec='@'
 
3789
fi
 
3790
 
3518
3791
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3519
3792
    [Take the output of nm and produce a listing of raw symbols and C names])
3520
3793
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3525
3798
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3526
3799
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3527
3800
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
3801
_LT_DECL([], [nm_file_list_spec], [1],
 
3802
    [Specify filename containing input files for $NM])
3528
3803
]) # _LT_CMD_GLOBAL_SYMBOLS
3529
3804
 
3530
3805
 
3536
3811
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3537
3812
_LT_TAGVAR(lt_prog_compiler_static, $1)=
3538
3813
 
3539
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
3540
3814
m4_if([$1], [CXX], [
3541
3815
  # C++ specific cases for pic, static, wl, etc.
3542
3816
  if test "$GXX" = yes; then
3587
3861
      # DJGPP does not support shared libraries at all
3588
3862
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3589
3863
      ;;
 
3864
    haiku*)
 
3865
      # PIC is the default for Haiku.
 
3866
      # The "-static" flag exists, but is broken.
 
3867
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
3868
      ;;
3590
3869
    interix[[3-9]]*)
3591
3870
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3592
3871
      # Instead, we relocate shared libraries at runtime.
3636
3915
          ;;
3637
3916
        esac
3638
3917
        ;;
 
3918
      mingw* | cygwin* | os2* | pw32* | cegcc*)
 
3919
        # This hack is so that the source file can tell whether it is being
 
3920
        # built for inclusion in a dll (and should export symbols for example).
 
3921
        m4_if([$1], [GCJ], [],
 
3922
          [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
3923
        ;;
3639
3924
      dgux*)
3640
3925
        case $cc_basename in
3641
3926
          ec++*)
3692
3977
            ;;
3693
3978
        esac
3694
3979
        ;;
3695
 
      linux* | k*bsd*-gnu)
 
3980
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
3696
3981
        case $cc_basename in
3697
3982
          KCC*)
3698
3983
            # KAI C++ Compiler
3725
4010
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3726
4011
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3727
4012
            ;;
3728
 
          xlc* | xlC*)
3729
 
            # IBM XL 8.0 on PPC
 
4013
          xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
 
4014
            # IBM XL 8.0, 9.0 on PPC and BlueGene
3730
4015
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731
4016
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3732
4017
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3788
4073
        ;;
3789
4074
      solaris*)
3790
4075
        case $cc_basename in
3791
 
          CC*)
 
4076
          CC* | sunCC*)
3792
4077
            # Sun C++ 4.2, 5.x and Centerline C++
3793
4078
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3794
4079
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3892
4177
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3893
4178
      ;;
3894
4179
 
 
4180
    haiku*)
 
4181
      # PIC is the default for Haiku.
 
4182
      # The "-static" flag exists, but is broken.
 
4183
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4184
      ;;
 
4185
 
3895
4186
    hpux*)
3896
4187
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3897
4188
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3934
4225
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3935
4226
      ;;
3936
4227
    esac
 
4228
 
 
4229
    case $cc_basename in
 
4230
    nvcc*) # Cuda Compiler Driver 2.2
 
4231
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
 
4232
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
 
4233
      ;;
 
4234
    esac
3937
4235
  else
3938
4236
    # PORTME Check for flag to pass linker flags through the system compiler.
3939
4237
    case $host_os in
3976
4274
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3977
4275
      ;;
3978
4276
 
3979
 
    linux* | k*bsd*-gnu)
 
4277
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
3980
4278
      case $cc_basename in
3981
4279
      # old Intel for x86_64 which still supported -KPIC.
3982
4280
      ecc*)
3997
4295
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
3998
4296
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
3999
4297
        ;;
4000
 
      pgcc* | pgf77* | pgf90* | pgf95*)
 
4298
      nagfor*)
 
4299
        # NAG Fortran compiler
 
4300
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
 
4301
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
4302
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4303
        ;;
 
4304
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4001
4305
        # Portland Group compilers (*not* the Pentium gcc compiler,
4002
4306
        # which looks to be a dead project)
4003
4307
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4009
4313
        # All Alpha code is PIC.
4010
4314
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4011
4315
        ;;
4012
 
      xl*)
4013
 
        # IBM XL C 8.0/Fortran 10.1 on PPC
 
4316
      xl* | bgxl* | bgf* | mpixl*)
 
4317
        # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4014
4318
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015
4319
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4016
4320
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4017
4321
        ;;
4018
4322
      *)
4019
4323
        case `$CC -V 2>&1 | sed 5q` in
 
4324
        *Sun\ F* | *Sun*Fortran*)
 
4325
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
4326
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4327
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4328
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 
4329
          ;;
4020
4330
        *Sun\ C*)
4021
4331
          # Sun C 5.9
4022
4332
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4023
4333
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4024
4334
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4025
4335
          ;;
4026
 
        *Sun\ F*)
4027
 
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
4028
 
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4029
 
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4030
 
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4031
 
          ;;
4032
4336
        esac
4033
4337
        ;;
4034
4338
      esac
4059
4363
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4060
4364
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4061
4365
      case $cc_basename in
4062
 
      f77* | f90* | f95*)
 
4366
      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4063
4367
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4064
4368
      *)
4065
4369
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4116
4420
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4117
4421
    ;;
4118
4422
esac
4119
 
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4120
 
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4121
 
        [How to pass a linker flag through the compiler])
 
4423
 
 
4424
AC_CACHE_CHECK([for $compiler option to produce PIC],
 
4425
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
 
4426
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
4427
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4122
4428
 
4123
4429
#
4124
4430
# Check to make sure the PIC flag actually works.
4137
4443
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4138
4444
        [Additional compiler flags for building library objects])
4139
4445
 
 
4446
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
4447
        [How to pass a linker flag through the compiler])
4140
4448
#
4141
4449
# Check to make sure the static flag actually works.
4142
4450
#
4157
4465
m4_defun([_LT_LINKER_SHLIBS],
4158
4466
[AC_REQUIRE([LT_PATH_LD])dnl
4159
4467
AC_REQUIRE([LT_PATH_NM])dnl
 
4468
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4160
4469
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4161
4470
m4_require([_LT_DECL_EGREP])dnl
4162
4471
m4_require([_LT_DECL_SED])dnl
4165
4474
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4166
4475
m4_if([$1], [CXX], [
4167
4476
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
4477
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4168
4478
  case $host_os in
4169
4479
  aix[[4-9]]*)
4170
4480
    # If we're using GNU nm, then we don't want the "-C" option.
4171
4481
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
4482
    # Also, AIX nm treats weak defined symbols like other global defined
 
4483
    # symbols, whereas GNU nm marks them as "W".
4172
4484
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4173
 
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
4485
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4174
4486
    else
4175
4487
      _LT_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'
4176
4488
    fi
4177
4489
    ;;
4178
4490
  pw32*)
4179
4491
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4180
 
  ;;
 
4492
    ;;
4181
4493
  cygwin* | mingw* | cegcc*)
4182
 
    _LT_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'
4183
 
  ;;
 
4494
    case $cc_basename in
 
4495
    cl*) ;;
 
4496
    *)
 
4497
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
4498
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
4499
      ;;
 
4500
    esac
 
4501
    ;;
4184
4502
  *)
4185
4503
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4186
 
  ;;
 
4504
    ;;
4187
4505
  esac
4188
 
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4189
4506
], [
4190
4507
  runpath_var=
4191
4508
  _LT_TAGVAR(allow_undefined_flag, $1)=
4248
4565
  esac
4249
4566
 
4250
4567
  _LT_TAGVAR(ld_shlibs, $1)=yes
 
4568
 
 
4569
  # On some targets, GNU ld is compatible enough with the native linker
 
4570
  # that we're better off using the native interface for both.
 
4571
  lt_use_gnu_ld_interface=no
4251
4572
  if test "$with_gnu_ld" = yes; then
 
4573
    case $host_os in
 
4574
      aix*)
 
4575
        # The AIX port of GNU ld has always aspired to compatibility
 
4576
        # with the native linker.  However, as the warning in the GNU ld
 
4577
        # block says, versions before 2.19.5* couldn't really create working
 
4578
        # shared libraries, regardless of the interface used.
 
4579
        case `$LD -v 2>&1` in
 
4580
          *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
 
4581
          *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
 
4582
          *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
 
4583
          *)
 
4584
            lt_use_gnu_ld_interface=yes
 
4585
            ;;
 
4586
        esac
 
4587
        ;;
 
4588
      *)
 
4589
        lt_use_gnu_ld_interface=yes
 
4590
        ;;
 
4591
    esac
 
4592
  fi
 
4593
 
 
4594
  if test "$lt_use_gnu_ld_interface" = yes; then
4252
4595
    # If archive_cmds runs LD, not CC, wlarc should be empty
4253
4596
    wlarc='${wl}'
4254
4597
 
4266
4609
    fi
4267
4610
    supports_anon_versioning=no
4268
4611
    case `$LD -v 2>&1` in
 
4612
      *GNU\ gold*) supports_anon_versioning=yes ;;
4269
4613
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4270
4614
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4271
4615
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4281
4625
        _LT_TAGVAR(ld_shlibs, $1)=no
4282
4626
        cat <<_LT_EOF 1>&2
4283
4627
 
4284
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
4628
*** Warning: the GNU linker, at least up to release 2.19, is reported
4285
4629
*** to be unable to reliably create shared libraries on AIX.
4286
4630
*** Therefore, libtool is disabling shared libraries support.  If you
4287
 
*** really care for shared libraries, you may want to modify your PATH
4288
 
*** so that a non-GNU linker is found, and then restart.
 
4631
*** really care for shared libraries, you may want to install binutils
 
4632
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
 
4633
*** You will then need to restart the configuration process.
4289
4634
 
4290
4635
_LT_EOF
4291
4636
      fi
4321
4666
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4322
4667
      # as there is no search path for DLLs.
4323
4668
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4669
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4324
4670
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4325
4671
      _LT_TAGVAR(always_export_symbols, $1)=no
4326
4672
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4327
 
      _LT_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'
 
4673
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
4674
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4328
4675
 
4329
4676
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4330
4677
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4342
4689
      fi
4343
4690
      ;;
4344
4691
 
 
4692
    haiku*)
 
4693
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4694
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
4695
      ;;
 
4696
 
4345
4697
    interix[[3-9]]*)
4346
4698
      _LT_TAGVAR(hardcode_direct, $1)=no
4347
4699
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4357
4709
      _LT_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'
4358
4710
      ;;
4359
4711
 
4360
 
    gnu* | linux* | tpf* | k*bsd*-gnu)
 
4712
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4361
4713
      tmp_diet=no
4362
4714
      if test "$host_os" = linux-dietlibc; then
4363
4715
        case $cc_basename in
4367
4719
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4368
4720
         && test "$tmp_diet" = no
4369
4721
      then
4370
 
        tmp_addflag=
 
4722
        tmp_addflag=' $pic_flag'
4371
4723
        tmp_sharedflag='-shared'
4372
4724
        case $cc_basename,$host_cpu in
4373
4725
        pgcc*)                          # Portland Group C compiler
4374
 
          _LT_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'
 
4726
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4375
4727
          tmp_addflag=' $pic_flag'
4376
4728
          ;;
4377
 
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
4378
 
          _LT_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'
 
4729
        pgf77* | pgf90* | pgf95* | pgfortran*)
 
4730
                                        # Portland Group f77 and f90 compilers
 
4731
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4379
4732
          tmp_addflag=' $pic_flag -Mnomain' ;;
4380
4733
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
4381
4734
          tmp_addflag=' -i_dynamic' ;;
4386
4739
        lf95*)                          # Lahey Fortran 8.1
4387
4740
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
4388
4741
          tmp_sharedflag='--shared' ;;
4389
 
        xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
 
4742
        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4390
4743
          tmp_sharedflag='-qmkshrobj'
4391
4744
          tmp_addflag= ;;
 
4745
        nvcc*)  # Cuda Compiler Driver 2.2
 
4746
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
4747
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
4748
          ;;
4392
4749
        esac
4393
4750
        case `$CC -V 2>&1 | sed 5q` in
4394
4751
        *Sun\ C*)                       # Sun C 5.9
4395
 
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
4752
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4396
4753
          _LT_TAGVAR(compiler_needs_object, $1)=yes
4397
4754
          tmp_sharedflag='-G' ;;
4398
4755
        *Sun\ F*)                       # Sun Fortran 8.3
4408
4765
        fi
4409
4766
 
4410
4767
        case $cc_basename in
4411
 
        xlf*)
 
4768
        xlf* | bgf* | bgxlf* | mpixlf*)
4412
4769
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4413
4770
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4414
4771
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4415
4772
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4416
 
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
 
4773
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4417
4774
          if test "x$supports_anon_versioning" = xyes; then
4418
4775
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4419
4776
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4420
4777
              echo "local: *; };" >> $output_objdir/$libname.ver~
4421
 
              $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 
4778
              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4422
4779
          fi
4423
4780
          ;;
4424
4781
        esac
4432
4789
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4433
4790
        wlarc=
4434
4791
      else
4435
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4436
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4792
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4793
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4437
4794
      fi
4438
4795
      ;;
4439
4796
 
4451
4808
 
4452
4809
_LT_EOF
4453
4810
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4454
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4811
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4812
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4456
4813
      else
4457
4814
        _LT_TAGVAR(ld_shlibs, $1)=no
4458
4815
      fi
4498
4855
 
4499
4856
    *)
4500
4857
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4502
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4858
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4859
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4503
4860
      else
4504
4861
        _LT_TAGVAR(ld_shlibs, $1)=no
4505
4862
      fi
4539
4896
      else
4540
4897
        # If we're using GNU nm, then we don't want the "-C" option.
4541
4898
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
4899
        # Also, AIX nm treats weak defined symbols like other global
 
4900
        # defined symbols, whereas GNU nm marks them as "W".
4542
4901
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4543
 
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
4902
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4544
4903
        else
4545
4904
          _LT_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'
4546
4905
        fi
4627
4986
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4628
4987
        # Determine the default libpath from the value encoded in an
4629
4988
        # empty executable.
4630
 
        _LT_SYS_MODULE_PATH_AIX
 
4989
        _LT_SYS_MODULE_PATH_AIX([$1])
4631
4990
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4632
 
        _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
4991
        _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4633
4992
      else
4634
4993
        if test "$host_cpu" = ia64; then
4635
4994
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4638
4997
        else
4639
4998
         # Determine the default libpath from the value encoded in an
4640
4999
         # empty executable.
4641
 
         _LT_SYS_MODULE_PATH_AIX
 
5000
         _LT_SYS_MODULE_PATH_AIX([$1])
4642
5001
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4643
5002
          # Warning - without using the other run time loading flags,
4644
5003
          # -berok will link without error, but may produce a broken library.
4645
5004
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4646
5005
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4647
 
          # Exported symbols can be pulled into shared objects from archives
4648
 
          _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
5006
          if test "$with_gnu_ld" = yes; then
 
5007
            # We only use this code for GNU lds that support --whole-archive.
 
5008
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
5009
          else
 
5010
            # Exported symbols can be pulled into shared objects from archives
 
5011
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
5012
          fi
4649
5013
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4650
5014
          # This is similar to how AIX traditionally builds its shared libraries.
4651
5015
          _LT_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'
4677
5041
      # Microsoft Visual C++.
4678
5042
      # hardcode_libdir_flag_spec is actually meaningless, as there is
4679
5043
      # no search path for DLLs.
4680
 
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4681
 
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4682
 
      # Tell ltmain to make .lib files, not .a files.
4683
 
      libext=lib
4684
 
      # Tell ltmain to make .dll files, not .so files.
4685
 
      shrext_cmds=".dll"
4686
 
      # FIXME: Setting linknames here is a bad hack.
4687
 
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4688
 
      # The linker will automatically build a .lib file if we build a DLL.
4689
 
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4690
 
      # FIXME: Should let the user specify the lib program.
4691
 
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4692
 
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4693
 
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5044
      case $cc_basename in
 
5045
      cl*)
 
5046
        # Native MSVC
 
5047
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5048
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5049
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
5050
        _LT_TAGVAR(file_list_spec, $1)='@'
 
5051
        # Tell ltmain to make .lib files, not .a files.
 
5052
        libext=lib
 
5053
        # Tell ltmain to make .dll files, not .so files.
 
5054
        shrext_cmds=".dll"
 
5055
        # FIXME: Setting linknames here is a bad hack.
 
5056
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
 
5057
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5058
            sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
 
5059
          else
 
5060
            sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
 
5061
          fi~
 
5062
          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
 
5063
          linknames='
 
5064
        # The linker will not automatically build a static lib if we build a DLL.
 
5065
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
5066
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5067
        _LT_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'
 
5068
        # Don't use ranlib
 
5069
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 
5070
        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
 
5071
          lt_tool_outputfile="@TOOL_OUTPUT@"~
 
5072
          case $lt_outputfile in
 
5073
            *.exe|*.EXE) ;;
 
5074
            *)
 
5075
              lt_outputfile="$lt_outputfile.exe"
 
5076
              lt_tool_outputfile="$lt_tool_outputfile.exe"
 
5077
              ;;
 
5078
          esac~
 
5079
          if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
 
5080
            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
 
5081
            $RM "$lt_outputfile.manifest";
 
5082
          fi'
 
5083
        ;;
 
5084
      *)
 
5085
        # Assume MSVC wrapper
 
5086
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5087
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5088
        # Tell ltmain to make .lib files, not .a files.
 
5089
        libext=lib
 
5090
        # Tell ltmain to make .dll files, not .so files.
 
5091
        shrext_cmds=".dll"
 
5092
        # FIXME: Setting linknames here is a bad hack.
 
5093
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 
5094
        # The linker will automatically build a .lib file if we build a DLL.
 
5095
        _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
5096
        # FIXME: Should let the user specify the lib program.
 
5097
        _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
5098
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5099
        ;;
 
5100
      esac
4694
5101
      ;;
4695
5102
 
4696
5103
    darwin* | rhapsody*)
4728
5135
 
4729
5136
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4730
5137
    freebsd* | dragonfly*)
4731
 
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
5138
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4732
5139
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4733
5140
      _LT_TAGVAR(hardcode_direct, $1)=yes
4734
5141
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4736
5143
 
4737
5144
    hpux9*)
4738
5145
      if test "$GCC" = yes; then
4739
 
        _LT_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'
 
5146
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4740
5147
      else
4741
5148
        _LT_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'
4742
5149
      fi
4751
5158
      ;;
4752
5159
 
4753
5160
    hpux10*)
4754
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4755
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5161
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 
5162
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4756
5163
      else
4757
5164
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4758
5165
      fi
4770
5177
      ;;
4771
5178
 
4772
5179
    hpux11*)
4773
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
5180
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
4774
5181
        case $host_cpu in
4775
5182
        hppa*64*)
4776
5183
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4777
5184
          ;;
4778
5185
        ia64*)
4779
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5186
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4780
5187
          ;;
4781
5188
        *)
4782
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5189
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4783
5190
          ;;
4784
5191
        esac
4785
5192
      else
4791
5198
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4792
5199
          ;;
4793
5200
        *)
4794
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5201
        m4_if($1, [], [
 
5202
          # Older versions of the 11.00 compiler do not understand -b yet
 
5203
          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
 
5204
          _LT_LINKER_OPTION([if $CC understands -b],
 
5205
            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
 
5206
            [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
 
5207
            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
 
5208
          [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
4795
5209
          ;;
4796
5210
        esac
4797
5211
      fi
4819
5233
 
4820
5234
    irix5* | irix6* | nonstopux*)
4821
5235
      if test "$GCC" = yes; then
4822
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5236
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4823
5237
        # Try to use the -exported_symbol ld option, if it does not
4824
5238
        # work, assume that -exports_file does not work either and
4825
5239
        # implicitly export all symbols.
4826
 
        save_LDFLAGS="$LDFLAGS"
4827
 
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4828
 
        AC_LINK_IFELSE(int foo(void) {},
4829
 
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4830
 
        )
4831
 
        LDFLAGS="$save_LDFLAGS"
 
5240
        # This should be the same for all languages, so no per-tag cache variable.
 
5241
        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
 
5242
          [lt_cv_irix_exported_symbol],
 
5243
          [save_LDFLAGS="$LDFLAGS"
 
5244
           LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
5245
           AC_LINK_IFELSE(
 
5246
             [AC_LANG_SOURCE(
 
5247
                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
 
5248
                              [C++], [[int foo (void) { return 0; }]],
 
5249
                              [Fortran 77], [[
 
5250
      subroutine foo
 
5251
      end]],
 
5252
                              [Fortran], [[
 
5253
      subroutine foo
 
5254
      end]])])],
 
5255
              [lt_cv_irix_exported_symbol=yes],
 
5256
              [lt_cv_irix_exported_symbol=no])
 
5257
           LDFLAGS="$save_LDFLAGS"])
 
5258
        if test "$lt_cv_irix_exported_symbol" = yes; then
 
5259
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
5260
        fi
4832
5261
      else
4833
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4834
 
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
 
5262
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
5263
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4835
5264
      fi
4836
5265
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4837
5266
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4893
5322
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4894
5323
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4895
5324
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4896
 
      _LT_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'
 
5325
      _LT_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'
4897
5326
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4898
5327
      ;;
4899
5328
 
4900
5329
    osf3*)
4901
5330
      if test "$GCC" = yes; then
4902
5331
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4903
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5332
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4904
5333
      else
4905
5334
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4906
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
5335
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
4907
5336
      fi
4908
5337
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4909
5338
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4913
5342
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
4914
5343
      if test "$GCC" = yes; then
4915
5344
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4916
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5345
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4917
5346
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4918
5347
      else
4919
5348
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4920
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
5349
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
4921
5350
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
4922
 
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
5351
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4923
5352
 
4924
5353
        # Both c and cxx compiler support -rpath directly
4925
5354
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4932
5361
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4933
5362
      if test "$GCC" = yes; then
4934
5363
        wlarc='${wl}'
4935
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5364
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4936
5365
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4937
 
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
5366
          $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4938
5367
      else
4939
5368
        case `$CC -V 2>&1` in
4940
5369
        *"Compilers 5.0"*)
5110
5539
      # Test whether the compiler implicitly links with -lc since on some
5111
5540
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5112
5541
      # to ld, don't add -lc before -lgcc.
5113
 
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5114
 
      $RM conftest*
5115
 
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
5542
      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
 
5543
        [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
 
5544
        [$RM conftest*
 
5545
        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5116
5546
 
5117
 
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5118
 
        soname=conftest
5119
 
        lib=conftest
5120
 
        libobjs=conftest.$ac_objext
5121
 
        deplibs=
5122
 
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5123
 
        pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5124
 
        compiler_flags=-v
5125
 
        linker_flags=-v
5126
 
        verstring=
5127
 
        output_objdir=.
5128
 
        libname=conftest
5129
 
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5130
 
        _LT_TAGVAR(allow_undefined_flag, $1)=
5131
 
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5132
 
        then
5133
 
          _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5134
 
        else
5135
 
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5136
 
        fi
5137
 
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5138
 
      else
5139
 
        cat conftest.err 1>&5
5140
 
      fi
5141
 
      $RM conftest*
5142
 
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
 
5547
        if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
5548
          soname=conftest
 
5549
          lib=conftest
 
5550
          libobjs=conftest.$ac_objext
 
5551
          deplibs=
 
5552
          wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
 
5553
          pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
 
5554
          compiler_flags=-v
 
5555
          linker_flags=-v
 
5556
          verstring=
 
5557
          output_objdir=.
 
5558
          libname=conftest
 
5559
          lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
 
5560
          _LT_TAGVAR(allow_undefined_flag, $1)=
 
5561
          if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
5562
          then
 
5563
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
5564
          else
 
5565
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5566
          fi
 
5567
          _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
5568
        else
 
5569
          cat conftest.err 1>&5
 
5570
        fi
 
5571
        $RM conftest*
 
5572
        ])
 
5573
      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5143
5574
      ;;
5144
5575
    esac
5145
5576
  fi
5204
5635
    to runtime path list])
5205
5636
_LT_TAGDECL([], [link_all_deplibs], [0],
5206
5637
    [Whether libtool must link a program against all its dependency libraries])
5207
 
_LT_TAGDECL([], [fix_srcfile_path], [1],
5208
 
    [Fix the shell variable $srcfile for the compiler])
5209
5638
_LT_TAGDECL([], [always_export_symbols], [0],
5210
5639
    [Set to "yes" if exported symbols are required])
5211
5640
_LT_TAGDECL([], [export_symbols_cmds], [2],
5216
5645
    [Symbols that must always be exported])
5217
5646
_LT_TAGDECL([], [prelink_cmds], [2],
5218
5647
    [Commands necessary for linking programs (against libraries) with templates])
 
5648
_LT_TAGDECL([], [postlink_cmds], [2],
 
5649
    [Commands necessary for finishing linking programs])
5219
5650
_LT_TAGDECL([], [file_list_spec], [1],
5220
5651
    [Specify filename containing input files])
5221
5652
dnl FIXME: Not yet implemented
5309
5740
])# _LT_LANG_C_CONFIG
5310
5741
 
5311
5742
 
5312
 
# _LT_PROG_CXX
5313
 
# ------------
5314
 
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5315
 
# compiler, we have our own version here.
5316
 
m4_defun([_LT_PROG_CXX],
5317
 
[
5318
 
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5319
 
AC_PROG_CXX
 
5743
# _LT_LANG_CXX_CONFIG([TAG])
 
5744
# --------------------------
 
5745
# Ensure that the configuration variables for a C++ compiler are suitably
 
5746
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
5747
# the compiler configuration to `libtool'.
 
5748
m4_defun([_LT_LANG_CXX_CONFIG],
 
5749
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
5750
m4_require([_LT_DECL_EGREP])dnl
 
5751
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5320
5752
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5321
5753
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5322
5754
    (test "X$CXX" != "Xg++"))) ; then
5324
5756
else
5325
5757
  _lt_caught_CXX_error=yes
5326
5758
fi
5327
 
popdef([AC_MSG_ERROR])
5328
 
])# _LT_PROG_CXX
5329
 
 
5330
 
dnl aclocal-1.4 backwards compatibility:
5331
 
dnl AC_DEFUN([_LT_PROG_CXX], [])
5332
 
 
5333
 
 
5334
 
# _LT_LANG_CXX_CONFIG([TAG])
5335
 
# --------------------------
5336
 
# Ensure that the configuration variables for a C++ compiler are suitably
5337
 
# defined.  These variables are subsequently used by _LT_CONFIG to write
5338
 
# the compiler configuration to `libtool'.
5339
 
m4_defun([_LT_LANG_CXX_CONFIG],
5340
 
[AC_REQUIRE([_LT_PROG_CXX])dnl
5341
 
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5342
 
m4_require([_LT_DECL_EGREP])dnl
5343
5759
 
5344
5760
AC_LANG_PUSH(C++)
5345
5761
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5361
5777
_LT_TAGVAR(module_expsym_cmds, $1)=
5362
5778
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5363
5779
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
5780
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
5781
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5364
5782
_LT_TAGVAR(no_undefined_flag, $1)=
5365
5783
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5366
5784
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5392
5810
 
5393
5811
  # Allow CC to be a program name with arguments.
5394
5812
  lt_save_CC=$CC
 
5813
  lt_save_CFLAGS=$CFLAGS
5395
5814
  lt_save_LD=$LD
5396
5815
  lt_save_GCC=$GCC
5397
5816
  GCC=$GXX
5409
5828
  fi
5410
5829
  test -z "${LDCXX+set}" || LD=$LDCXX
5411
5830
  CC=${CXX-"c++"}
 
5831
  CFLAGS=$CXXFLAGS
5412
5832
  compiler=$CC
5413
5833
  _LT_TAGVAR(compiler, $1)=$CC
5414
5834
  _LT_CC_BASENAME([$compiler])
5430
5850
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5431
5851
      # archiving commands below assume that GNU ld is being used.
5432
5852
      if test "$with_gnu_ld" = yes; then
5433
 
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5434
 
        _LT_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'
 
5853
        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5854
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5435
5855
 
5436
5856
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5437
5857
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5463
5883
      # Commands to make compiler produce verbose output that lists
5464
5884
      # what "hidden" libraries, object files and flags are used when
5465
5885
      # linking a shared library.
5466
 
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
5886
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5467
5887
 
5468
5888
    else
5469
5889
      GXX=no
5572
5992
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5573
5993
          # Determine the default libpath from the value encoded in an empty
5574
5994
          # executable.
5575
 
          _LT_SYS_MODULE_PATH_AIX
 
5995
          _LT_SYS_MODULE_PATH_AIX([$1])
5576
5996
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5577
5997
 
5578
 
          _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
5998
          _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5579
5999
        else
5580
6000
          if test "$host_cpu" = ia64; then
5581
6001
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5584
6004
          else
5585
6005
            # Determine the default libpath from the value encoded in an
5586
6006
            # empty executable.
5587
 
            _LT_SYS_MODULE_PATH_AIX
 
6007
            _LT_SYS_MODULE_PATH_AIX([$1])
5588
6008
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5589
6009
            # Warning - without using the other run time loading flags,
5590
6010
            # -berok will link without error, but may produce a broken library.
5591
6011
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5592
6012
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5593
 
            # Exported symbols can be pulled into shared objects from archives
5594
 
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6013
            if test "$with_gnu_ld" = yes; then
 
6014
              # We only use this code for GNU lds that support --whole-archive.
 
6015
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
6016
            else
 
6017
              # Exported symbols can be pulled into shared objects from archives
 
6018
              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6019
            fi
5595
6020
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5596
6021
            # This is similar to how AIX traditionally builds its shared
5597
6022
            # libraries.
5621
6046
        ;;
5622
6047
 
5623
6048
      cygwin* | mingw* | pw32* | cegcc*)
5624
 
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5625
 
        # as there is no search path for DLLs.
5626
 
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5627
 
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5628
 
        _LT_TAGVAR(always_export_symbols, $1)=no
5629
 
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6049
        case $GXX,$cc_basename in
 
6050
        ,cl* | no,cl*)
 
6051
          # Native MSVC
 
6052
          # hardcode_libdir_flag_spec is actually meaningless, as there is
 
6053
          # no search path for DLLs.
 
6054
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6055
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6056
          _LT_TAGVAR(always_export_symbols, $1)=yes
 
6057
          _LT_TAGVAR(file_list_spec, $1)='@'
 
6058
          # Tell ltmain to make .lib files, not .a files.
 
6059
          libext=lib
 
6060
          # Tell ltmain to make .dll files, not .so files.
 
6061
          shrext_cmds=".dll"
 
6062
          # FIXME: Setting linknames here is a bad hack.
 
6063
          _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
 
6064
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6065
              $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
 
6066
            else
 
6067
              $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
 
6068
            fi~
 
6069
            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
 
6070
            linknames='
 
6071
          # The linker will not automatically build a static lib if we build a DLL.
 
6072
          # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
6073
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6074
          # Don't use ranlib
 
6075
          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 
6076
          _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
 
6077
            lt_tool_outputfile="@TOOL_OUTPUT@"~
 
6078
            case $lt_outputfile in
 
6079
              *.exe|*.EXE) ;;
 
6080
              *)
 
6081
                lt_outputfile="$lt_outputfile.exe"
 
6082
                lt_tool_outputfile="$lt_tool_outputfile.exe"
 
6083
                ;;
 
6084
            esac~
 
6085
            func_to_tool_file "$lt_outputfile"~
 
6086
            if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
 
6087
              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
 
6088
              $RM "$lt_outputfile.manifest";
 
6089
            fi'
 
6090
          ;;
 
6091
        *)
 
6092
          # g++
 
6093
          # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
6094
          # as there is no search path for DLLs.
 
6095
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6096
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
6097
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6098
          _LT_TAGVAR(always_export_symbols, $1)=no
 
6099
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5630
6100
 
5631
 
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5632
 
          _LT_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'
5633
 
          # If the export-symbols file already is a .def file (1st line
5634
 
          # is EXPORTS), use it as is; otherwise, prepend...
5635
 
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5636
 
            cp $export_symbols $output_objdir/$soname.def;
5637
 
          else
5638
 
            echo EXPORTS > $output_objdir/$soname.def;
5639
 
            cat $export_symbols >> $output_objdir/$soname.def;
5640
 
          fi~
5641
 
          $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'
5642
 
        else
5643
 
          _LT_TAGVAR(ld_shlibs, $1)=no
5644
 
        fi
5645
 
        ;;
 
6101
          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
6102
            _LT_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'
 
6103
            # If the export-symbols file already is a .def file (1st line
 
6104
            # is EXPORTS), use it as is; otherwise, prepend...
 
6105
            _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6106
              cp $export_symbols $output_objdir/$soname.def;
 
6107
            else
 
6108
              echo EXPORTS > $output_objdir/$soname.def;
 
6109
              cat $export_symbols >> $output_objdir/$soname.def;
 
6110
            fi~
 
6111
            $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'
 
6112
          else
 
6113
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6114
          fi
 
6115
          ;;
 
6116
        esac
 
6117
        ;;
5646
6118
      darwin* | rhapsody*)
5647
6119
        _LT_DARWIN_LINKER_FEATURES($1)
5648
6120
        ;;
5684
6156
      gnu*)
5685
6157
        ;;
5686
6158
 
 
6159
      haiku*)
 
6160
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6161
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6162
        ;;
 
6163
 
5687
6164
      hpux9*)
5688
6165
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5689
6166
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5708
6185
            # explicitly linking system object files so we need to strip them
5709
6186
            # from the output so that they don't get included in the library
5710
6187
            # dependencies.
5711
 
            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 "X$list" | $Xsed'
 
6188
            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; func_echo_all "$list"'
5712
6189
            ;;
5713
6190
          *)
5714
6191
            if test "$GXX" = yes; then
5715
 
              _LT_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'
 
6192
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
5716
6193
            else
5717
6194
              # FIXME: insert proper C++ library support
5718
6195
              _LT_TAGVAR(ld_shlibs, $1)=no
5773
6250
            # explicitly linking system object files so we need to strip them
5774
6251
            # from the output so that they don't get included in the library
5775
6252
            # dependencies.
5776
 
            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 "X$list" | $Xsed'
 
6253
            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; func_echo_all "$list"'
5777
6254
            ;;
5778
6255
          *)
5779
6256
            if test "$GXX" = yes; then
5783
6260
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5784
6261
                    ;;
5785
6262
                  ia64*)
5786
 
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6263
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5787
6264
                    ;;
5788
6265
                  *)
5789
 
                    _LT_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'
 
6266
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5790
6267
                    ;;
5791
6268
                esac
5792
6269
              fi
5816
6293
        case $cc_basename in
5817
6294
          CC*)
5818
6295
            # SGI C++
5819
 
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6296
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5820
6297
 
5821
6298
            # Archives containing C++ object files must be created using
5822
6299
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5827
6304
          *)
5828
6305
            if test "$GXX" = yes; then
5829
6306
              if test "$with_gnu_ld" = no; then
5830
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6307
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5831
6308
              else
5832
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
 
6309
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
5833
6310
              fi
5834
6311
            fi
5835
6312
            _LT_TAGVAR(link_all_deplibs, $1)=yes
5840
6317
        _LT_TAGVAR(inherit_rpath, $1)=yes
5841
6318
        ;;
5842
6319
 
5843
 
      linux* | k*bsd*-gnu)
 
6320
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
5844
6321
        case $cc_basename in
5845
6322
          KCC*)
5846
6323
            # Kuck and Associates, Inc. (KAI) C++ Compiler
5858
6335
            # explicitly linking system object files so we need to strip them
5859
6336
            # from the output so that they don't get included in the library
5860
6337
            # dependencies.
5861
 
            output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
6338
            output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
5862
6339
 
5863
6340
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5864
6341
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5895
6372
          pgCC* | pgcpp*)
5896
6373
            # Portland Group C++ compiler
5897
6374
            case `$CC -V` in
5898
 
            *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
 
6375
            *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
5899
6376
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5900
6377
                rm -rf $tpldir~
5901
6378
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5902
 
                compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
 
6379
                compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
5903
6380
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5904
6381
                rm -rf $tpldir~
5905
6382
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5906
 
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
 
6383
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
5907
6384
                $RANLIB $oldlib'
5908
6385
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5909
6386
                rm -rf $tpldir~
5910
6387
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5911
 
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
6388
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5912
6389
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5913
6390
                rm -rf $tpldir~
5914
6391
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5915
 
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
6392
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5916
6393
              ;;
5917
 
            *) # Version 6 will use weak symbols
 
6394
            *) # Version 6 and above use weak symbols
5918
6395
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5919
6396
              _LT_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'
5920
6397
              ;;
5922
6399
 
5923
6400
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5924
6401
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5925
 
            _LT_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'
 
6402
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5926
6403
            ;;
5927
6404
          cxx*)
5928
6405
            # Compaq C++
5941
6418
            # explicitly linking system object files so we need to strip them
5942
6419
            # from the output so that they don't get included in the library
5943
6420
            # dependencies.
5944
 
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
6421
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
5945
6422
            ;;
5946
 
          xl*)
 
6423
          xl* | mpixl* | bgxl*)
5947
6424
            # IBM XL 8.0 on PPC, with GNU ld
5948
6425
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5949
6426
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5963
6440
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5964
6441
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5965
6442
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5966
 
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6443
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5967
6444
              _LT_TAGVAR(compiler_needs_object, $1)=yes
5968
6445
 
5969
6446
              # Not sure whether something based on
5970
6447
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5971
6448
              # would be better.
5972
 
              output_verbose_link_cmd='echo'
 
6449
              output_verbose_link_cmd='func_echo_all'
5973
6450
 
5974
6451
              # Archives containing C++ object files must be created using
5975
6452
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6038
6515
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6039
6516
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6040
6517
          fi
6041
 
          output_verbose_link_cmd=echo
 
6518
          output_verbose_link_cmd=func_echo_all
6042
6519
        else
6043
6520
          _LT_TAGVAR(ld_shlibs, $1)=no
6044
6521
        fi
6073
6550
            case $host in
6074
6551
              osf3*)
6075
6552
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6076
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6553
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6077
6554
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6078
6555
                ;;
6079
6556
              *)
6080
6557
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6081
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6558
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6082
6559
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6083
6560
                  echo "-hidden">> $lib.exp~
6084
 
                  $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
 
6561
                  $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~
6085
6562
                  $RM $lib.exp'
6086
6563
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6087
6564
                ;;
6097
6574
            # explicitly linking system object files so we need to strip them
6098
6575
            # from the output so that they don't get included in the library
6099
6576
            # dependencies.
6100
 
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
6577
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6101
6578
            ;;
6102
6579
          *)
6103
6580
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6104
6581
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6105
6582
              case $host in
6106
6583
                osf3*)
6107
 
                  _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6584
                  _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6108
6585
                  ;;
6109
6586
                *)
6110
 
                  _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6587
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6111
6588
                  ;;
6112
6589
              esac
6113
6590
 
6117
6594
              # Commands to make compiler produce verbose output that lists
6118
6595
              # what "hidden" libraries, object files and flags are used when
6119
6596
              # linking a shared library.
6120
 
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
6597
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6121
6598
 
6122
6599
            else
6123
6600
              # FIXME: insert proper C++ library support
6153
6630
 
6154
6631
      solaris*)
6155
6632
        case $cc_basename in
6156
 
          CC*)
 
6633
          CC* | sunCC*)
6157
6634
            # Sun C++ 4.2, 5.x and Centerline C++
6158
6635
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6159
6636
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6174
6651
            esac
6175
6652
            _LT_TAGVAR(link_all_deplibs, $1)=yes
6176
6653
 
6177
 
            output_verbose_link_cmd='echo'
 
6654
            output_verbose_link_cmd='func_echo_all'
6178
6655
 
6179
6656
            # Archives containing C++ object files must be created using
6180
6657
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6194
6671
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6195
6672
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6196
6673
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6197
 
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
6674
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6198
6675
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6199
 
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
6676
                  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6200
6677
 
6201
6678
                # Commands to make compiler produce verbose output that lists
6202
6679
                # what "hidden" libraries, object files and flags are used when
6203
6680
                # linking a shared library.
6204
 
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
6681
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6205
6682
              else
6206
6683
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
6207
6684
                # platform.
6212
6689
                # Commands to make compiler produce verbose output that lists
6213
6690
                # what "hidden" libraries, object files and flags are used when
6214
6691
                # linking a shared library.
6215
 
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
6692
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6216
6693
              fi
6217
6694
 
6218
6695
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6266
6743
          CC*)
6267
6744
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6268
6745
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6746
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
 
6747
              '"$_LT_TAGVAR(old_archive_cmds, $1)"
 
6748
            _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
 
6749
              '"$_LT_TAGVAR(reload_cmds, $1)"
6269
6750
            ;;
6270
6751
          *)
6271
6752
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6321
6802
  fi # test -n "$compiler"
6322
6803
 
6323
6804
  CC=$lt_save_CC
 
6805
  CFLAGS=$lt_save_CFLAGS
6324
6806
  LDCXX=$LD
6325
6807
  LD=$lt_save_LD
6326
6808
  GCC=$lt_save_GCC
6335
6817
])# _LT_LANG_CXX_CONFIG
6336
6818
 
6337
6819
 
 
6820
# _LT_FUNC_STRIPNAME_CNF
 
6821
# ----------------------
 
6822
# func_stripname_cnf prefix suffix name
 
6823
# strip PREFIX and SUFFIX off of NAME.
 
6824
# PREFIX and SUFFIX must not contain globbing or regex special
 
6825
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
6826
# dot (in which case that matches only a dot).
 
6827
#
 
6828
# This function is identical to the (non-XSI) version of func_stripname,
 
6829
# except this one can be used by m4 code that may be executed by configure,
 
6830
# rather than the libtool script.
 
6831
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
 
6832
AC_REQUIRE([_LT_DECL_SED])
 
6833
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
 
6834
func_stripname_cnf ()
 
6835
{
 
6836
  case ${2} in
 
6837
  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
 
6838
  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
 
6839
  esac
 
6840
} # func_stripname_cnf
 
6841
])# _LT_FUNC_STRIPNAME_CNF
 
6842
 
6338
6843
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6339
6844
# ---------------------------------
6340
6845
# Figure out "hidden" library dependencies from verbose
6343
6848
# objects, libraries and library flags.
6344
6849
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6345
6850
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6851
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6346
6852
# Dependencies to place before and after the object being linked:
6347
6853
_LT_TAGVAR(predep_objects, $1)=
6348
6854
_LT_TAGVAR(postdep_objects, $1)=
6393
6899
};
6394
6900
_LT_EOF
6395
6901
])
 
6902
 
 
6903
_lt_libdeps_save_CFLAGS=$CFLAGS
 
6904
case "$CC $CFLAGS " in #(
 
6905
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 
6906
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
 
6907
esac
 
6908
 
6396
6909
dnl Parse the compiler output and extract the necessary
6397
6910
dnl objects, libraries and library flags.
6398
6911
if AC_TRY_EVAL(ac_compile); then
6404
6917
  pre_test_object_deps_done=no
6405
6918
 
6406
6919
  for p in `eval "$output_verbose_link_cmd"`; do
6407
 
    case $p in
 
6920
    case ${prev}${p} in
6408
6921
 
6409
6922
    -L* | -R* | -l*)
6410
6923
       # Some compilers place space between "-{L,R}" and the path.
6413
6926
          test $p = "-R"; then
6414
6927
         prev=$p
6415
6928
         continue
6416
 
       else
6417
 
         prev=
6418
6929
       fi
6419
6930
 
 
6931
       # Expand the sysroot to ease extracting the directories later.
 
6932
       if test -z "$prev"; then
 
6933
         case $p in
 
6934
         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
 
6935
         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
 
6936
         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
 
6937
         esac
 
6938
       fi
 
6939
       case $p in
 
6940
       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
 
6941
       esac
6420
6942
       if test "$pre_test_object_deps_done" = no; then
6421
 
         case $p in
6422
 
         -L* | -R*)
 
6943
         case ${prev} in
 
6944
         -L | -R)
6423
6945
           # Internal compiler library paths should come after those
6424
6946
           # provided the user.  The postdeps already come after the
6425
6947
           # user supplied libs so there is no need to process them.
6439
6961
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6440
6962
         fi
6441
6963
       fi
 
6964
       prev=
6442
6965
       ;;
6443
6966
 
 
6967
    *.lto.$objext) ;; # Ignore GCC LTO objects
6444
6968
    *.$objext)
6445
6969
       # This assumes that the test object file only shows up
6446
6970
       # once in the compiler output.
6476
7000
fi
6477
7001
 
6478
7002
$RM -f confest.$objext
 
7003
CFLAGS=$_lt_libdeps_save_CFLAGS
6479
7004
 
6480
7005
# PORTME: override above test on systems where it is broken
6481
7006
m4_if([$1], [CXX],
6512
7037
 
6513
7038
solaris*)
6514
7039
  case $cc_basename in
6515
 
  CC*)
 
7040
  CC* | sunCC*)
6516
7041
    # The more standards-conforming stlport4 library is
6517
7042
    # incompatible with the Cstd library. Avoid specifying
6518
7043
    # it if it's in CXXFLAGS. Ignore libCrun as
6556
7081
])# _LT_SYS_HIDDEN_LIBDEPS
6557
7082
 
6558
7083
 
6559
 
# _LT_PROG_F77
6560
 
# ------------
6561
 
# Since AC_PROG_F77 is broken, in that it returns the empty string
6562
 
# if there is no fortran compiler, we have our own version here.
6563
 
m4_defun([_LT_PROG_F77],
6564
 
[
6565
 
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6566
 
AC_PROG_F77
6567
 
if test -z "$F77" || test "X$F77" = "Xno"; then
6568
 
  _lt_disable_F77=yes
6569
 
fi
6570
 
popdef([AC_MSG_ERROR])
6571
 
])# _LT_PROG_F77
6572
 
 
6573
 
dnl aclocal-1.4 backwards compatibility:
6574
 
dnl AC_DEFUN([_LT_PROG_F77], [])
6575
 
 
6576
 
 
6577
7084
# _LT_LANG_F77_CONFIG([TAG])
6578
7085
# --------------------------
6579
7086
# Ensure that the configuration variables for a Fortran 77 compiler are
6580
7087
# suitably defined.  These variables are subsequently used by _LT_CONFIG
6581
7088
# to write the compiler configuration to `libtool'.
6582
7089
m4_defun([_LT_LANG_F77_CONFIG],
6583
 
[AC_REQUIRE([_LT_PROG_F77])dnl
6584
 
AC_LANG_PUSH(Fortran 77)
 
7090
[AC_LANG_PUSH(Fortran 77)
 
7091
if test -z "$F77" || test "X$F77" = "Xno"; then
 
7092
  _lt_disable_F77=yes
 
7093
fi
6585
7094
 
6586
7095
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6587
7096
_LT_TAGVAR(allow_undefined_flag, $1)=
6600
7109
_LT_TAGVAR(module_expsym_cmds, $1)=
6601
7110
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6602
7111
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7112
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7113
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6603
7114
_LT_TAGVAR(no_undefined_flag, $1)=
6604
7115
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6605
7116
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6639
7150
  # Allow CC to be a program name with arguments.
6640
7151
  lt_save_CC="$CC"
6641
7152
  lt_save_GCC=$GCC
 
7153
  lt_save_CFLAGS=$CFLAGS
6642
7154
  CC=${F77-"f77"}
 
7155
  CFLAGS=$FFLAGS
6643
7156
  compiler=$CC
6644
7157
  _LT_TAGVAR(compiler, $1)=$CC
6645
7158
  _LT_CC_BASENAME([$compiler])
6693
7206
 
6694
7207
  GCC=$lt_save_GCC
6695
7208
  CC="$lt_save_CC"
 
7209
  CFLAGS="$lt_save_CFLAGS"
6696
7210
fi # test "$_lt_disable_F77" != yes
6697
7211
 
6698
7212
AC_LANG_POP
6699
7213
])# _LT_LANG_F77_CONFIG
6700
7214
 
6701
7215
 
6702
 
# _LT_PROG_FC
6703
 
# -----------
6704
 
# Since AC_PROG_FC is broken, in that it returns the empty string
6705
 
# if there is no fortran compiler, we have our own version here.
6706
 
m4_defun([_LT_PROG_FC],
6707
 
[
6708
 
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6709
 
AC_PROG_FC
6710
 
if test -z "$FC" || test "X$FC" = "Xno"; then
6711
 
  _lt_disable_FC=yes
6712
 
fi
6713
 
popdef([AC_MSG_ERROR])
6714
 
])# _LT_PROG_FC
6715
 
 
6716
 
dnl aclocal-1.4 backwards compatibility:
6717
 
dnl AC_DEFUN([_LT_PROG_FC], [])
6718
 
 
6719
 
 
6720
7216
# _LT_LANG_FC_CONFIG([TAG])
6721
7217
# -------------------------
6722
7218
# Ensure that the configuration variables for a Fortran compiler are
6723
7219
# suitably defined.  These variables are subsequently used by _LT_CONFIG
6724
7220
# to write the compiler configuration to `libtool'.
6725
7221
m4_defun([_LT_LANG_FC_CONFIG],
6726
 
[AC_REQUIRE([_LT_PROG_FC])dnl
6727
 
AC_LANG_PUSH(Fortran)
 
7222
[AC_LANG_PUSH(Fortran)
 
7223
 
 
7224
if test -z "$FC" || test "X$FC" = "Xno"; then
 
7225
  _lt_disable_FC=yes
 
7226
fi
6728
7227
 
6729
7228
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6730
7229
_LT_TAGVAR(allow_undefined_flag, $1)=
6743
7242
_LT_TAGVAR(module_expsym_cmds, $1)=
6744
7243
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6745
7244
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7245
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7246
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6746
7247
_LT_TAGVAR(no_undefined_flag, $1)=
6747
7248
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6748
7249
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6782
7283
  # Allow CC to be a program name with arguments.
6783
7284
  lt_save_CC="$CC"
6784
7285
  lt_save_GCC=$GCC
 
7286
  lt_save_CFLAGS=$CFLAGS
6785
7287
  CC=${FC-"f95"}
 
7288
  CFLAGS=$FCFLAGS
6786
7289
  compiler=$CC
6787
7290
  GCC=$ac_cv_fc_compiler_gnu
6788
7291
 
6838
7341
  fi # test -n "$compiler"
6839
7342
 
6840
7343
  GCC=$lt_save_GCC
6841
 
  CC="$lt_save_CC"
 
7344
  CC=$lt_save_CC
 
7345
  CFLAGS=$lt_save_CFLAGS
6842
7346
fi # test "$_lt_disable_FC" != yes
6843
7347
 
6844
7348
AC_LANG_POP
6875
7379
_LT_LINKER_BOILERPLATE
6876
7380
 
6877
7381
# Allow CC to be a program name with arguments.
6878
 
lt_save_CC="$CC"
 
7382
lt_save_CC=$CC
 
7383
lt_save_CFLAGS=$CFLAGS
6879
7384
lt_save_GCC=$GCC
6880
7385
GCC=yes
6881
7386
CC=${GCJ-"gcj"}
 
7387
CFLAGS=$GCJFLAGS
6882
7388
compiler=$CC
6883
7389
_LT_TAGVAR(compiler, $1)=$CC
6884
7390
_LT_TAGVAR(LD, $1)="$LD"
6888
7394
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6889
7395
 
6890
7396
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7397
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7398
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6891
7399
 
6892
7400
## CAVEAT EMPTOR:
6893
7401
## There is no encapsulation within the following macros, do not change
6907
7415
AC_LANG_RESTORE
6908
7416
 
6909
7417
GCC=$lt_save_GCC
6910
 
CC="$lt_save_CC"
 
7418
CC=$lt_save_CC
 
7419
CFLAGS=$lt_save_CFLAGS
6911
7420
])# _LT_LANG_GCJ_CONFIG
6912
7421
 
6913
7422
 
6942
7451
 
6943
7452
# Allow CC to be a program name with arguments.
6944
7453
lt_save_CC="$CC"
 
7454
lt_save_CFLAGS=$CFLAGS
6945
7455
lt_save_GCC=$GCC
6946
7456
GCC=
6947
7457
CC=${RC-"windres"}
 
7458
CFLAGS=
6948
7459
compiler=$CC
6949
7460
_LT_TAGVAR(compiler, $1)=$CC
6950
7461
_LT_CC_BASENAME([$compiler])
6957
7468
 
6958
7469
GCC=$lt_save_GCC
6959
7470
AC_LANG_RESTORE
6960
 
CC="$lt_save_CC"
 
7471
CC=$lt_save_CC
 
7472
CFLAGS=$lt_save_CFLAGS
6961
7473
])# _LT_LANG_RC_CONFIG
6962
7474
 
6963
7475
 
7016
7528
AC_SUBST([OBJDUMP])
7017
7529
])
7018
7530
 
 
7531
# _LT_DECL_DLLTOOL
 
7532
# ----------------
 
7533
# Ensure DLLTOOL variable is set.
 
7534
m4_defun([_LT_DECL_DLLTOOL],
 
7535
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
7536
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
7537
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
 
7538
AC_SUBST([DLLTOOL])
 
7539
])
7019
7540
 
7020
7541
# _LT_DECL_SED
7021
7542
# ------------
7109
7630
# Try some XSI features
7110
7631
xsi_shell=no
7111
7632
( _lt_dummy="a/b/c"
7112
 
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7113
 
      = c,a/b,, \
 
7633
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
 
7634
      = c,a/b,b/c, \
7114
7635
    && eval 'test $(( 1 + 1 )) -eq 2 \
7115
7636
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7116
7637
  && xsi_shell=yes
7149
7670
])# _LT_CHECK_SHELL_FEATURES
7150
7671
 
7151
7672
 
7152
 
# _LT_PROG_XSI_SHELLFNS
7153
 
# ---------------------
7154
 
# Bourne and XSI compatible variants of some useful shell functions.
7155
 
m4_defun([_LT_PROG_XSI_SHELLFNS],
7156
 
[case $xsi_shell in
7157
 
  yes)
7158
 
    cat << \_LT_EOF >> "$cfgfile"
7159
 
 
7160
 
# func_dirname file append nondir_replacement
7161
 
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7162
 
# otherwise set result to NONDIR_REPLACEMENT.
7163
 
func_dirname ()
7164
 
{
7165
 
  case ${1} in
7166
 
    */*) func_dirname_result="${1%/*}${2}" ;;
7167
 
    *  ) func_dirname_result="${3}" ;;
7168
 
  esac
7169
 
}
7170
 
 
7171
 
# func_basename file
7172
 
func_basename ()
7173
 
{
7174
 
  func_basename_result="${1##*/}"
7175
 
}
7176
 
 
7177
 
# func_dirname_and_basename file append nondir_replacement
7178
 
# perform func_basename and func_dirname in a single function
7179
 
# call:
7180
 
#   dirname:  Compute the dirname of FILE.  If nonempty,
7181
 
#             add APPEND to the result, otherwise set result
7182
 
#             to NONDIR_REPLACEMENT.
7183
 
#             value returned in "$func_dirname_result"
7184
 
#   basename: Compute filename of FILE.
7185
 
#             value retuned in "$func_basename_result"
7186
 
# Implementation must be kept synchronized with func_dirname
7187
 
# and func_basename. For efficiency, we do not delegate to
7188
 
# those functions but instead duplicate the functionality here.
7189
 
func_dirname_and_basename ()
7190
 
{
7191
 
  case ${1} in
7192
 
    */*) func_dirname_result="${1%/*}${2}" ;;
7193
 
    *  ) func_dirname_result="${3}" ;;
7194
 
  esac
7195
 
  func_basename_result="${1##*/}"
7196
 
}
7197
 
 
7198
 
# func_stripname prefix suffix name
7199
 
# strip PREFIX and SUFFIX off of NAME.
7200
 
# PREFIX and SUFFIX must not contain globbing or regex special
7201
 
# characters, hashes, percent signs, but SUFFIX may contain a leading
7202
 
# dot (in which case that matches only a dot).
7203
 
func_stripname ()
7204
 
{
7205
 
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7206
 
  # positional parameters, so assign one to ordinary parameter first.
7207
 
  func_stripname_result=${3}
7208
 
  func_stripname_result=${func_stripname_result#"${1}"}
7209
 
  func_stripname_result=${func_stripname_result%"${2}"}
7210
 
}
7211
 
 
7212
 
# func_opt_split
7213
 
func_opt_split ()
7214
 
{
7215
 
  func_opt_split_opt=${1%%=*}
7216
 
  func_opt_split_arg=${1#*=}
7217
 
}
7218
 
 
7219
 
# func_lo2o object
7220
 
func_lo2o ()
7221
 
{
7222
 
  case ${1} in
7223
 
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7224
 
    *)    func_lo2o_result=${1} ;;
7225
 
  esac
7226
 
}
7227
 
 
7228
 
# func_xform libobj-or-source
7229
 
func_xform ()
7230
 
{
7231
 
  func_xform_result=${1%.*}.lo
7232
 
}
7233
 
 
7234
 
# func_arith arithmetic-term...
7235
 
func_arith ()
7236
 
{
7237
 
  func_arith_result=$(( $[*] ))
7238
 
}
7239
 
 
7240
 
# func_len string
7241
 
# STRING may not start with a hyphen.
7242
 
func_len ()
7243
 
{
7244
 
  func_len_result=${#1}
7245
 
}
7246
 
 
7247
 
_LT_EOF
7248
 
    ;;
7249
 
  *) # Bourne compatible functions.
7250
 
    cat << \_LT_EOF >> "$cfgfile"
7251
 
 
7252
 
# func_dirname file append nondir_replacement
7253
 
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7254
 
# otherwise set result to NONDIR_REPLACEMENT.
7255
 
func_dirname ()
7256
 
{
7257
 
  # Extract subdirectory from the argument.
7258
 
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7259
 
  if test "X$func_dirname_result" = "X${1}"; then
7260
 
    func_dirname_result="${3}"
7261
 
  else
7262
 
    func_dirname_result="$func_dirname_result${2}"
7263
 
  fi
7264
 
}
7265
 
 
7266
 
# func_basename file
7267
 
func_basename ()
7268
 
{
7269
 
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7270
 
}
7271
 
 
7272
 
dnl func_dirname_and_basename
7273
 
dnl A portable version of this function is already defined in general.m4sh
7274
 
dnl so there is no need for it here.
7275
 
 
7276
 
# func_stripname prefix suffix name
7277
 
# strip PREFIX and SUFFIX off of NAME.
7278
 
# PREFIX and SUFFIX must not contain globbing or regex special
7279
 
# characters, hashes, percent signs, but SUFFIX may contain a leading
7280
 
# dot (in which case that matches only a dot).
7281
 
# func_strip_suffix prefix name
7282
 
func_stripname ()
7283
 
{
7284
 
  case ${2} in
7285
 
    .*) func_stripname_result=`$ECHO "X${3}" \
7286
 
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7287
 
    *)  func_stripname_result=`$ECHO "X${3}" \
7288
 
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7289
 
  esac
7290
 
}
7291
 
 
7292
 
# sed scripts:
7293
 
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7294
 
my_sed_long_arg='1s/^-[[^=]]*=//'
7295
 
 
7296
 
# func_opt_split
7297
 
func_opt_split ()
7298
 
{
7299
 
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7300
 
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7301
 
}
7302
 
 
7303
 
# func_lo2o object
7304
 
func_lo2o ()
7305
 
{
7306
 
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7307
 
}
7308
 
 
7309
 
# func_xform libobj-or-source
7310
 
func_xform ()
7311
 
{
7312
 
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7313
 
}
7314
 
 
7315
 
# func_arith arithmetic-term...
7316
 
func_arith ()
7317
 
{
7318
 
  func_arith_result=`expr "$[@]"`
7319
 
}
7320
 
 
7321
 
# func_len string
7322
 
# STRING may not start with a hyphen.
7323
 
func_len ()
7324
 
{
7325
 
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7326
 
}
7327
 
 
7328
 
_LT_EOF
7329
 
esac
7330
 
 
7331
 
case $lt_shell_append in
7332
 
  yes)
7333
 
    cat << \_LT_EOF >> "$cfgfile"
7334
 
 
7335
 
# func_append var value
7336
 
# Append VALUE to the end of shell variable VAR.
7337
 
func_append ()
7338
 
{
7339
 
  eval "$[1]+=\$[2]"
7340
 
}
7341
 
_LT_EOF
7342
 
    ;;
7343
 
  *)
7344
 
    cat << \_LT_EOF >> "$cfgfile"
7345
 
 
7346
 
# func_append var value
7347
 
# Append VALUE to the end of shell variable VAR.
7348
 
func_append ()
7349
 
{
7350
 
  eval "$[1]=\$$[1]\$[2]"
7351
 
}
7352
 
 
7353
 
_LT_EOF
7354
 
    ;;
7355
 
  esac
7356
 
])
 
7673
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
 
7674
# ------------------------------------------------------
 
7675
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
 
7676
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
 
7677
m4_defun([_LT_PROG_FUNCTION_REPLACE],
 
7678
[dnl {
 
7679
sed -e '/^$1 ()$/,/^} # $1 /c\
 
7680
$1 ()\
 
7681
{\
 
7682
m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
 
7683
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
 
7684
  && mv -f "$cfgfile.tmp" "$cfgfile" \
 
7685
    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
7686
test 0 -eq $? || _lt_function_replace_fail=:
 
7687
])
 
7688
 
 
7689
 
 
7690
# _LT_PROG_REPLACE_SHELLFNS
 
7691
# -------------------------
 
7692
# Replace existing portable implementations of several shell functions with
 
7693
# equivalent extended shell implementations where those features are available..
 
7694
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
 
7695
[if test x"$xsi_shell" = xyes; then
 
7696
  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
 
7697
    case ${1} in
 
7698
      */*) func_dirname_result="${1%/*}${2}" ;;
 
7699
      *  ) func_dirname_result="${3}" ;;
 
7700
    esac])
 
7701
 
 
7702
  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
 
7703
    func_basename_result="${1##*/}"])
 
7704
 
 
7705
  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
 
7706
    case ${1} in
 
7707
      */*) func_dirname_result="${1%/*}${2}" ;;
 
7708
      *  ) func_dirname_result="${3}" ;;
 
7709
    esac
 
7710
    func_basename_result="${1##*/}"])
 
7711
 
 
7712
  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
 
7713
    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
7714
    # positional parameters, so assign one to ordinary parameter first.
 
7715
    func_stripname_result=${3}
 
7716
    func_stripname_result=${func_stripname_result#"${1}"}
 
7717
    func_stripname_result=${func_stripname_result%"${2}"}])
 
7718
 
 
7719
  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
 
7720
    func_split_long_opt_name=${1%%=*}
 
7721
    func_split_long_opt_arg=${1#*=}])
 
7722
 
 
7723
  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
 
7724
    func_split_short_opt_arg=${1#??}
 
7725
    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
7726
 
 
7727
  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
 
7728
    case ${1} in
 
7729
      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
7730
      *)    func_lo2o_result=${1} ;;
 
7731
    esac])
 
7732
 
 
7733
  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
7734
 
 
7735
  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
7736
 
 
7737
  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
 
7738
fi
 
7739
 
 
7740
if test x"$lt_shell_append" = xyes; then
 
7741
  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
7742
 
 
7743
  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
 
7744
    func_quote_for_eval "${2}"
 
7745
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
 
7746
    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
7747
 
 
7748
  # Save a `func_append' function call where possible by direct use of '+='
 
7749
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
 
7750
    && mv -f "$cfgfile.tmp" "$cfgfile" \
 
7751
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
7752
  test 0 -eq $? || _lt_function_replace_fail=:
 
7753
else
 
7754
  # Save a `func_append' function call even when '+=' is not available
 
7755
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
 
7756
    && mv -f "$cfgfile.tmp" "$cfgfile" \
 
7757
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
7758
  test 0 -eq $? || _lt_function_replace_fail=:
 
7759
fi
 
7760
 
 
7761
if test x"$_lt_function_replace_fail" = x":"; then
 
7762
  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
 
7763
fi
 
7764
])
 
7765
 
 
7766
# _LT_PATH_CONVERSION_FUNCTIONS
 
7767
# -----------------------------
 
7768
# Determine which file name conversion functions should be used by
 
7769
# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
 
7770
# for certain cross-compile configurations and native mingw.
 
7771
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
 
7772
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7773
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
7774
AC_MSG_CHECKING([how to convert $build file names to $host format])
 
7775
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
 
7776
[case $host in
 
7777
  *-*-mingw* )
 
7778
    case $build in
 
7779
      *-*-mingw* ) # actually msys
 
7780
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
 
7781
        ;;
 
7782
      *-*-cygwin* )
 
7783
        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
 
7784
        ;;
 
7785
      * ) # otherwise, assume *nix
 
7786
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
 
7787
        ;;
 
7788
    esac
 
7789
    ;;
 
7790
  *-*-cygwin* )
 
7791
    case $build in
 
7792
      *-*-mingw* ) # actually msys
 
7793
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
 
7794
        ;;
 
7795
      *-*-cygwin* )
 
7796
        lt_cv_to_host_file_cmd=func_convert_file_noop
 
7797
        ;;
 
7798
      * ) # otherwise, assume *nix
 
7799
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
 
7800
        ;;
 
7801
    esac
 
7802
    ;;
 
7803
  * ) # unhandled hosts (and "normal" native builds)
 
7804
    lt_cv_to_host_file_cmd=func_convert_file_noop
 
7805
    ;;
 
7806
esac
 
7807
])
 
7808
to_host_file_cmd=$lt_cv_to_host_file_cmd
 
7809
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
 
7810
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
 
7811
         [0], [convert $build file names to $host format])dnl
 
7812
 
 
7813
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
 
7814
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
 
7815
[#assume ordinary cross tools, or native build.
 
7816
lt_cv_to_tool_file_cmd=func_convert_file_noop
 
7817
case $host in
 
7818
  *-*-mingw* )
 
7819
    case $build in
 
7820
      *-*-mingw* ) # actually msys
 
7821
        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
 
7822
        ;;
 
7823
    esac
 
7824
    ;;
 
7825
esac
 
7826
])
 
7827
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
7828
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
 
7829
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
 
7830
         [0], [convert $build files to toolchain format])dnl
 
7831
])# _LT_PATH_CONVERSION_FUNCTIONS