~ubuntu-branches/ubuntu/jaunty/qterm/jaunty

« back to all changes in this revision

Viewing changes to admin/libtool.m4.in

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2006-10-06 07:38:46 UTC
  • mfrom: (2.1.8 edgy)
  • Revision ID: james.westby@ubuntu.com-20061006073846-2je2hzmmvdyi6d69
Tags: 1:0.4.0-4
fix FTBFS on hurd-i386, Thanks Cyril Brulebois (closes: #391300)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
# serial 47 AC_PROG_LIBTOOL
26
26
 
 
27
 
 
28
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
29
# -----------------------------------------------------------
 
30
# If this macro is not defined by Autoconf, define it here.
 
31
m4_ifdef([AC_PROVIDE_IFELSE],
 
32
         [],
 
33
         [m4_define([AC_PROVIDE_IFELSE],
 
34
                 [m4_ifdef([AC_PROVIDE_$1],
 
35
                           [$2], [$3])])])
 
36
 
 
37
 
27
38
# AC_PROG_LIBTOOL
28
39
# ---------------
29
40
AC_DEFUN([AC_PROG_LIBTOOL],
34
45
    [AC_LIBTOOL_CXX],
35
46
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
36
47
  ])])
 
48
dnl And a similar setup for Fortran 77 support
 
49
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
50
    [AC_LIBTOOL_F77],
 
51
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
52
])])
37
53
 
38
54
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
39
55
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
59
75
AC_DEFUN([_AC_PROG_LIBTOOL],
60
76
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
61
77
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
78
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
62
79
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
63
80
 
64
81
# This can be used to rebuild libtool when needed
86
103
AC_REQUIRE([AC_PROG_LD])dnl
87
104
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
88
105
AC_REQUIRE([AC_PROG_NM])dnl
89
 
AC_REQUIRE([LT_AC_PROG_SED])dnl
90
106
 
91
107
AC_REQUIRE([AC_PROG_LN_S])dnl
92
108
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
143
159
ofile="$default_ofile"
144
160
with_gnu_ld="$lt_cv_prog_gnu_ld"
145
161
 
 
162
AC_CHECK_TOOL(AR, ar, false)
146
163
AC_CHECK_TOOL(RANLIB, ranlib, :)
147
164
AC_CHECK_TOOL(STRIP, strip, :)
148
165
 
192
209
  ;;
193
210
esac
194
211
 
195
 
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
196
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
212
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
213
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
197
214
enable_win32_dll=yes, enable_win32_dll=no)
198
215
 
199
216
AC_ARG_ENABLE([libtool-lock],
224
241
LTCC=${LTCC-"$CC"}
225
242
 
226
243
# Allow CC to be a program name with arguments.
227
 
set dummy $CC
228
 
compiler="[$]2"
 
244
compiler=$CC
229
245
])# _LT_AC_SYS_COMPILER
230
246
 
231
247
 
239
255
# to the aix ld manual.
240
256
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
241
257
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
242
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
258
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
243
259
}'`
244
260
# Check for a 64-bit object if we didn't find anything.
245
 
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
261
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
246
262
}'`; fi],[])
247
263
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
248
264
])# _LT_AC_SYS_LIBPATH_AIX
249
265
 
250
266
 
 
267
# _LT_AC_SHELL_INIT(ARG)
 
268
# ----------------------
 
269
AC_DEFUN([_LT_AC_SHELL_INIT],
 
270
[ifdef([AC_DIVERSION_NOTICE],
 
271
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
272
         [AC_DIVERT_PUSH(NOTICE)])
 
273
$1
 
274
AC_DIVERT_POP
 
275
])# _LT_AC_SHELL_INIT
 
276
 
 
277
 
251
278
# _LT_AC_PROG_ECHO_BACKSLASH
252
279
# --------------------------
253
280
# Add some code to the start of the generated configure script which
254
281
# will find an echo command which doesn't interpret backslashes.
255
282
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
256
 
[ifdef([AC_DIVERSION_NOTICE],
257
 
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
258
 
         [AC_DIVERT_PUSH(NOTICE)])
259
 
 
 
283
[_LT_AC_SHELL_INIT([
260
284
# Check that we are running under the correct shell.
261
285
SHELL=${CONFIG_SHELL-/bin/sh}
262
286
 
274
298
elif test "X[$]1" = X--fallback-echo; then
275
299
  # Avoid inline document here, it may be left over
276
300
  :
277
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
301
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
278
302
  # Yippee, $echo works!
279
303
  :
280
304
else
404
428
fi
405
429
 
406
430
AC_SUBST(ECHO)
407
 
AC_DIVERT_POP
408
 
])# _LT_AC_PROG_ECHO_BACKSLASH
 
431
])])# _LT_AC_PROG_ECHO_BACKSLASH
409
432
 
410
433
 
411
434
# _LT_AC_LOCK
438
461
  # Find out which ABI we are using.
439
462
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
440
463
  if AC_TRY_EVAL(ac_compile); then
 
464
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
465
    case `/usr/bin/file conftest.$ac_objext` in
 
466
    *32-bit*)
 
467
      LD="${LD-ld} -melf32bsmip"
 
468
      ;;
 
469
    *N32*)
 
470
      LD="${LD-ld} -melf32bmipn32"
 
471
      ;;
 
472
    *64-bit*)
 
473
      LD="${LD-ld} -melf64bmip"
 
474
      ;;
 
475
    esac
 
476
   else
441
477
    case `/usr/bin/file conftest.$ac_objext` in
442
478
    *32-bit*)
443
479
      LD="${LD-ld} -32"
449
485
      LD="${LD-ld} -64"
450
486
      ;;
451
487
    esac
 
488
   fi
452
489
  fi
453
490
  rm -rf conftest*
454
491
  ;;
455
492
 
456
 
*-*-linux*)
457
 
  # Test if the compiler is 64bit
 
493
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
494
  # Find out which ABI we are using.
458
495
  echo 'int i;' > conftest.$ac_ext
459
496
  if AC_TRY_EVAL(ac_compile); then
460
 
    case `/usr/bin/file conftest.$ac_objext` in
461
 
    *"ELF 32"*)
 
497
    case "`/usr/bin/file conftest.o`" in
 
498
    *32-bit*)
462
499
      LINUX_64_MODE="32"
 
500
      case $host in
 
501
        x86_64-*linux*)
 
502
          LD="${LD-ld} -m elf_i386"
 
503
          ;;
 
504
        ppc64-*linux*)
 
505
          LD="${LD-ld} -m elf32ppclinux"
 
506
          ;;
 
507
        s390x-*linux*)
 
508
          LD="${LD-ld} -m elf_s390"
 
509
          ;;
 
510
        sparc64-*linux*)
 
511
          LD="${LD-ld} -m elf32_sparc"
 
512
          ;;
 
513
      esac
463
514
      ;;
464
 
    *"ELF 64"*)
 
515
    *64-bit*)
465
516
      LINUX_64_MODE="64"
 
517
      case $host in
 
518
        x86_64-*linux*)
 
519
          LD="${LD-ld} -m elf_x86_64"
 
520
          ;;
 
521
        ppc*-*linux*|powerpc*-*linux*)
 
522
          LD="${LD-ld} -m elf64ppc"
 
523
          ;;
 
524
        s390*-*linux*)
 
525
          LD="${LD-ld} -m elf64_s390"
 
526
          ;;
 
527
        sparc*-*linux*)
 
528
          LD="${LD-ld} -m elf64_sparc"
 
529
          ;;
 
530
      esac
466
531
      ;;
467
532
    esac
468
533
  fi
469
534
  rm -rf conftest*
470
535
  ;;
471
 
  
 
536
 
472
537
*-*-sco3.2v5*)
473
538
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
474
539
  SAVE_CFLAGS="$CFLAGS"
482
547
    CFLAGS="$SAVE_CFLAGS"
483
548
  fi
484
549
  ;;
485
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
550
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
486
551
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
487
552
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
488
553
  AC_CHECK_TOOL(AS, as, false)
489
554
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
490
 
 
491
 
  # recent cygwin and mingw systems supply a stub DllMain which the user
492
 
  # can override, but on older systems we have to supply one
493
 
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
494
 
    [AC_TRY_LINK([],
495
 
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
496
 
      DllMain (0, 0, 0);],
497
 
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
498
 
 
499
 
  case $host/$CC in
500
 
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
501
 
    # old mingw systems require "-dll" to link a DLL, while more recent ones
502
 
    # require "-mdll"
503
 
    SAVE_CFLAGS="$CFLAGS"
504
 
    CFLAGS="$CFLAGS -mdll"
505
 
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
506
 
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
507
 
    CFLAGS="$SAVE_CFLAGS" ;;
508
 
  *-*-cygwin* | *-*-pw32*)
509
 
    # cygwin systems need to pass --dll to the linker, and not link
510
 
    # crt.o which will require a WinMain@16 definition.
511
 
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
512
 
  esac
513
555
  ;;
514
556
  ])
515
557
esac
524
566
# ----------------------------------------------------------------
525
567
# Check whether the given compiler option works
526
568
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
527
 
[AC_CACHE_CHECK([$1], [$2],
 
569
[AC_REQUIRE([LT_AC_PROG_SED])
 
570
AC_CACHE_CHECK([$1], [$2],
528
571
  [$2=no
529
572
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
530
 
   save_CFLAGS="$CFLAGS"
531
 
   CFLAGS="$CFLAGS $3"
532
 
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
533
 
   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
 
573
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
574
   lt_compiler_flag="$3"
 
575
   # Insert the option either (1) after the last *FLAGS variable, or
 
576
   # (2) before a word containing "conftest.", or (3) at the end.
 
577
   # Note that $ac_compile itself does not contain backslashes and begins
 
578
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
579
   # The option is referenced via a variable to avoid confusing sed.
 
580
   lt_compile=`echo "$ac_compile" | $SED \
 
581
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
582
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
583
   -e 's:$: $lt_compiler_flag:'`
 
584
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
585
   (eval "$lt_compile" 2>conftest.err)
 
586
   ac_status=$?
 
587
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
588
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
589
   if (exit $ac_status) && test -s "$ac_outfile"; then
534
590
     # The compiler can only warn and ignore the option if not recognized
535
591
     # So say no if there are warnings
536
 
     if test -s conftest.err; then
537
 
       # Append any errors to the config.log.
538
 
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
539
 
     else
 
592
     if test ! -s conftest.err; then
540
593
       $2=yes
541
594
     fi
542
595
   fi
543
596
   $rm conftest*
544
 
   CFLAGS="$save_CFLAGS"
545
597
])
546
598
 
547
599
if test x"[$]$2" = xyes; then
561
613
  [$2=no
562
614
   save_LDFLAGS="$LDFLAGS"
563
615
   LDFLAGS="$LDFLAGS $3"
564
 
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
616
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
565
617
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
566
618
     # The compiler can only warn and ignore the option if not recognized
567
619
     # So say no if there are warnings
593
645
  i=0
594
646
  testring="ABCD"
595
647
 
596
 
  case $host_os in
 
648
  case $build_os in
597
649
  msdosdjgpp*)
598
650
    # On DJGPP, this test can blow up pretty badly due to problems in libc
599
651
    # (any single argument exceeding 2000 bytes causes a buffer overrun
609
661
    lt_cv_sys_max_cmd_len=-1;
610
662
    ;;
611
663
 
612
 
  *)
 
664
  cygwin* | mingw*)
 
665
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
666
    # about 5 minutes as the teststring grows exponentially.
 
667
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
668
    # you end up with a "frozen" computer, even though with patience
 
669
    # the test eventually succeeds (with a max line length of 256k).
 
670
    # Instead, let's just punt: use the minimum linelength reported by
 
671
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
672
    lt_cv_sys_max_cmd_len=8192;
 
673
    ;;
 
674
 
 
675
 *)
613
676
    # If test is not a shell built-in, we'll probably end up computing a
614
677
    # maximum length that is only half of the actual maximum length, but
615
678
    # we can't tell.
753
816
    lt_cv_dlopen_self=yes
754
817
    ;;
755
818
 
756
 
  cygwin* | mingw* | pw32*)
 
819
  mingw* | pw32*)
757
820
    lt_cv_dlopen="LoadLibrary"
758
821
    lt_cv_dlopen_libs=
759
822
   ;;
760
823
 
 
824
  cygwin*)
 
825
    lt_cv_dlopen="dlopen"
 
826
    lt_cv_dlopen_libs=
 
827
   ;;
 
828
 
 
829
  darwin*)
 
830
  # if libdl is installed we need to link against it
 
831
    AC_CHECK_LIB([dl], [dlopen],
 
832
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
833
    lt_cv_dlopen="dyld"
 
834
    lt_cv_dlopen_libs=
 
835
    lt_cv_dlopen_self=yes
 
836
    ])
 
837
   ;;
 
838
    
761
839
  *)
762
840
    AC_CHECK_FUNC([shl_load],
763
841
          [lt_cv_dlopen="shl_load"],
844
922
   mkdir conftest
845
923
   cd conftest
846
924
   mkdir out
847
 
   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
848
 
                   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
849
 
          [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
850
 
                   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
851
 
          [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
852
 
                   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
853
 
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
925
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
854
926
 
855
927
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
856
928
   # that will create temporary files in the current directory regardless of
859
931
   # builds.
860
932
   chmod -w .
861
933
 
862
 
   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
 
934
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
935
   # Insert the option either (1) after the last *FLAGS variable, or
 
936
   # (2) before a word containing "conftest.", or (3) at the end.
 
937
   # Note that $ac_compile itself does not contain backslashes and begins
 
938
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
939
   lt_compile=`echo "$ac_compile" | $SED \
 
940
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
941
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
942
   -e 's:$: $lt_compiler_flag:'`
 
943
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
944
   (eval "$lt_compile" 2>out/conftest.err)
 
945
   ac_status=$?
 
946
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
947
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
948
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
863
949
   then
864
950
     # The compiler can only warn and ignore the option if not recognized
865
951
     # So say no if there are warnings
866
 
     if test -s out/conftest.err; then
867
 
       # Append any errors to the config.log.
868
 
       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
869
 
     else
 
952
     if test ! -s out/conftest.err; then
870
953
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
871
954
     fi
872
955
   fi
873
 
   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
874
 
          [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
875
 
          [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
876
956
   chmod u+w .
877
957
   $rm conftest* out/*
878
958
   rmdir out
934
1014
[AC_MSG_CHECKING([how to hardcode library paths into programs])
935
1015
_LT_AC_TAGVAR(hardcode_action, $1)=
936
1016
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
937
 
   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
 
1017
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
 
1018
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
938
1019
 
939
1020
  # We can hardcode non-existant directories.
940
1021
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
978
1059
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
979
1060
  AC_MSG_RESULT([yes])
980
1061
else
981
 
  AC_MSG_RESULT([no])
 
1062
# FIXME - insert some real tests, host_os isn't really good enough
 
1063
  case $host_os in
 
1064
   darwin*)
 
1065
       if test -n "$STRIP" ; then
 
1066
         striplib="$STRIP -x"
 
1067
         AC_MSG_RESULT([yes])
 
1068
       else
 
1069
  AC_MSG_RESULT([no])
 
1070
fi
 
1071
       ;;
 
1072
   *)
 
1073
  AC_MSG_RESULT([no])
 
1074
    ;;
 
1075
  esac  
982
1076
fi
983
1077
])# AC_LIBTOOL_SYS_LIB_STRIP
984
1078
 
991
1085
library_names_spec=
992
1086
libname_spec='lib$name'
993
1087
soname_spec=
 
1088
shrext=".so"
994
1089
postinstall_cmds=
995
1090
postuninstall_cmds=
996
1091
finish_cmds=
1011
1106
case $host_os in
1012
1107
aix3*)
1013
1108
  version_type=linux
1014
 
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
1109
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1015
1110
  shlibpath_var=LIBPATH
1016
1111
 
1017
1112
  # AIX 3 has no versioning support, so we append a major version to the name.
1018
 
  soname_spec='${libname}${release}.so$major'
 
1113
  soname_spec='${libname}${release}${shared_ext}$major'
1019
1114
  ;;
1020
1115
 
1021
1116
aix4* | aix5*)
1022
1117
  version_type=linux
 
1118
  need_lib_prefix=no
 
1119
  need_version=no
 
1120
  hardcode_into_libs=yes
1023
1121
  if test "$host_cpu" = ia64; then
1024
1122
    # AIX 5 supports IA64
1025
 
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
1123
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1026
1124
    shlibpath_var=LD_LIBRARY_PATH
1027
1125
  else
1028
1126
    # With GCC up to 2.95.x, collect2 would create an import file
1048
1146
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1049
1147
      # instead of lib<name>.a to let people know that these are not
1050
1148
      # typical AIX shared libraries.
1051
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
1149
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1052
1150
    else
1053
1151
      # We preserve .a as extension for shared libraries through AIX4.2
1054
1152
      # and later when we are not doing run time linking.
1055
1153
      library_names_spec='${libname}${release}.a $libname.a'
1056
 
      soname_spec='${libname}${release}.so$major'
 
1154
      soname_spec='${libname}${release}${shared_ext}$major'
1057
1155
    fi
1058
1156
    shlibpath_var=LIBPATH
1059
1157
  fi
1066
1164
  ;;
1067
1165
 
1068
1166
beos*)
1069
 
  library_names_spec='${libname}.so'
 
1167
  library_names_spec='${libname}${shared_ext}'
1070
1168
  dynamic_linker="$host_os ld.so"
1071
1169
  shlibpath_var=LIBRARY_PATH
1072
1170
  ;;
1074
1172
bsdi4*)
1075
1173
  version_type=linux
1076
1174
  need_version=no
1077
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1078
 
  soname_spec='${libname}${release}.so$major'
 
1175
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1176
  soname_spec='${libname}${release}${shared_ext}$major'
1079
1177
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1080
1178
  shlibpath_var=LD_LIBRARY_PATH
1081
1179
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1087
1185
 
1088
1186
cygwin* | mingw* | pw32*)
1089
1187
  version_type=windows
 
1188
  shrext=".dll"
1090
1189
  need_version=no
1091
1190
  need_lib_prefix=no
 
1191
 
1092
1192
  case $GCC,$host_os in
1093
 
  yes,cygwin*)
 
1193
  yes,cygwin* | yes,mingw* | yes,pw32*)
1094
1194
    library_names_spec='$libname.dll.a'
1095
 
    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1096
 
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1097
 
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
1195
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
1196
    postinstall_cmds='base_file=`basename \${file}`~
 
1197
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1098
1198
      dldir=$destdir/`dirname \$dlpath`~
1099
1199
      test -d \$dldir || mkdir -p \$dldir~
1100
 
      $install_prog .libs/$dlname \$dldir/$dlname'
1101
 
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
1200
      $install_prog $dir/$dlname \$dldir/$dlname'
 
1201
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1102
1202
      dlpath=$dir/\$dldll~
1103
1203
       $rm \$dlpath'
1104
 
    ;;
1105
 
  yes,mingw*)
1106
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1107
 
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
1108
 
    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
1109
 
      # It is most probably a Windows format PATH printed by
1110
 
      # mingw gcc, but we are running on Cygwin. Gcc prints its search
1111
 
      # path with ; separators, and with drive letters. We can handle the
1112
 
      # drive letters (cygwin fileutils understands them), so leave them,
1113
 
      # especially as we might pass files found there to a mingw objdump,
1114
 
      # which wouldn't understand a cygwinified path. Ahh.
1115
 
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1116
 
    else
1117
 
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
1118
 
    fi
1119
 
    ;;
1120
 
  yes,pw32*)
1121
 
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1122
 
    ;;
 
1204
    shlibpath_overrides_runpath=yes
 
1205
 
 
1206
    case $host_os in
 
1207
    cygwin*)
 
1208
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
1209
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1210
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
1211
      ;;
 
1212
    mingw*)
 
1213
      # MinGW DLLs use traditional 'lib' prefix
 
1214
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1215
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1216
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
1217
        # It is most probably a Windows format PATH printed by
 
1218
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
1219
        # path with ; separators, and with drive letters. We can handle the
 
1220
        # drive letters (cygwin fileutils understands them), so leave them,
 
1221
        # especially as we might pass files found there to a mingw objdump,
 
1222
        # which wouldn't understand a cygwinified path. Ahh.
 
1223
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1224
      else
 
1225
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1226
      fi
 
1227
      ;;
 
1228
    pw32*)
 
1229
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
1230
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
1231
      ;;
 
1232
    esac
 
1233
    ;;
 
1234
 
1123
1235
  *)
1124
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
1236
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1125
1237
    ;;
1126
1238
  esac
1127
1239
  dynamic_linker='Win32 ld.exe'
1134
1246
  version_type=darwin
1135
1247
  need_lib_prefix=no
1136
1248
  need_version=no
1137
 
  # FIXME: Relying on posixy $() will cause problems for
1138
 
  #        cross-compilation, but unfortunately the echo tests do not
1139
 
  #        yet detect zsh echo's removal of \ escapes.
1140
 
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1141
 
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
1249
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
1250
  soname_spec='${libname}${release}${major}$shared_ext'
1142
1251
  shlibpath_overrides_runpath=yes
1143
1252
  shlibpath_var=DYLD_LIBRARY_PATH
 
1253
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
 
1254
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
1255
  if test "$GCC" = yes; then
 
1256
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 
1257
  else
 
1258
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
1259
  fi
 
1260
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1144
1261
  ;;
1145
1262
 
1146
1263
dgux*)
1147
1264
  version_type=linux
1148
1265
  need_lib_prefix=no
1149
1266
  need_version=no
1150
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1151
 
  soname_spec='${libname}${release}.so$major'
 
1267
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
1268
  soname_spec='${libname}${release}${shared_ext}$major'
1152
1269
  shlibpath_var=LD_LIBRARY_PATH
1153
1270
  ;;
1154
1271
 
1156
1273
  dynamic_linker=no
1157
1274
  ;;
1158
1275
 
 
1276
freebsd*-gnu*)
 
1277
  version_type=linux
 
1278
  need_lib_prefix=no
 
1279
  need_version=no
 
1280
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1281
  soname_spec='${libname}${release}${shared_ext}$major'
 
1282
  shlibpath_var=LD_LIBRARY_PATH
 
1283
  shlibpath_overrides_runpath=no
 
1284
  hardcode_into_libs=yes
 
1285
  dynamic_linker='GNU ld.so'
 
1286
  ;;
 
1287
 
1159
1288
freebsd*)
1160
1289
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1161
1290
  version_type=freebsd-$objformat
1162
1291
  case $version_type in
1163
1292
    freebsd-elf*)
1164
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
1293
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1165
1294
      need_version=no
1166
1295
      need_lib_prefix=no
1167
1296
      ;;
1168
1297
    freebsd-*)
1169
 
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
1298
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1170
1299
      need_version=yes
1171
1300
      ;;
1172
1301
  esac
1190
1319
  version_type=linux
1191
1320
  need_lib_prefix=no
1192
1321
  need_version=no
1193
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1194
 
  soname_spec='${libname}${release}.so$major'
 
1322
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
1323
  soname_spec='${libname}${release}${shared_ext}$major'
1195
1324
  shlibpath_var=LD_LIBRARY_PATH
1196
1325
  hardcode_into_libs=yes
1197
1326
  ;;
1202
1331
  version_type=sunos
1203
1332
  need_lib_prefix=no
1204
1333
  need_version=no
1205
 
  if test "$host_cpu" = ia64; then
 
1334
  case "$host_cpu" in
 
1335
  ia64*)
 
1336
    shrext='.so'
1206
1337
    hardcode_into_libs=yes
1207
1338
    dynamic_linker="$host_os dld.so"
1208
1339
    shlibpath_var=LD_LIBRARY_PATH
1209
1340
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1210
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1211
 
    soname_spec='${libname}${release}.so$major'
 
1341
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1342
    soname_spec='${libname}${release}${shared_ext}$major'
1212
1343
    if test "X$HPUX_IA64_MODE" = X32; then
1213
1344
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1214
1345
    else
1215
1346
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1216
1347
    fi
1217
1348
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1218
 
  else
 
1349
    ;;
 
1350
   hppa*64*)
 
1351
     shrext='.sl'
 
1352
     hardcode_into_libs=yes
 
1353
     dynamic_linker="$host_os dld.sl"
 
1354
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
1355
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1356
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1357
     soname_spec='${libname}${release}${shared_ext}$major'
 
1358
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
1359
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1360
     ;;
 
1361
   *)
 
1362
    shrext='.sl'
1219
1363
    dynamic_linker="$host_os dld.sl"
1220
1364
    shlibpath_var=SHLIB_PATH
1221
1365
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1222
 
    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1223
 
    soname_spec='${libname}${release}.sl$major'
1224
 
  fi
 
1366
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1367
    soname_spec='${libname}${release}${shared_ext}$major'
 
1368
    ;;
 
1369
  esac
1225
1370
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1226
1371
  postinstall_cmds='chmod 555 $lib'
1227
1372
  ;;
1229
1374
irix5* | irix6* | nonstopux*)
1230
1375
  case $host_os in
1231
1376
    nonstopux*) version_type=nonstopux ;;
1232
 
    *)          version_type=irix ;;
 
1377
    *)
 
1378
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
1379
                version_type=linux
 
1380
        else
 
1381
                version_type=irix
 
1382
        fi ;;
1233
1383
  esac
1234
1384
  need_lib_prefix=no
1235
1385
  need_version=no
1236
 
  soname_spec='${libname}${release}.so$major'
1237
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
1386
  soname_spec='${libname}${release}${shared_ext}$major'
 
1387
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1238
1388
  case $host_os in
1239
1389
  irix5* | nonstopux*)
1240
1390
    libsuff= shlibsuff=
1241
1391
    ;;
1242
1392
  *)
1243
1393
    case $LD in # libtool.m4 will add one of these switches to LD
1244
 
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1245
 
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1246
 
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
1394
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
1395
      libsuff= shlibsuff= libmagic=32-bit;;
 
1396
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
1397
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
1398
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
1399
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1247
1400
    *) libsuff= shlibsuff= libmagic=never-match;;
1248
1401
    esac
1249
1402
    ;;
1252
1405
  shlibpath_overrides_runpath=no
1253
1406
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1254
1407
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
1408
  hardcode_into_libs=yes
1255
1409
  ;;
1256
1410
 
1257
1411
# No shared lib support for Linux oldld, aout, or coff.
1264
1418
  version_type=linux
1265
1419
  need_lib_prefix=no
1266
1420
  need_version=no
1267
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1268
 
  soname_spec='${libname}${release}.so$major'
 
1421
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1422
  soname_spec='${libname}${release}${shared_ext}$major'
1269
1423
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1270
1424
  libsuff=
1271
1425
  if test "x$LINUX_64_MODE" = x64; then
1297
1451
  need_lib_prefix=no
1298
1452
  need_version=no
1299
1453
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1300
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
1454
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1301
1455
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1302
1456
    dynamic_linker='NetBSD (a.out) ld.so'
1303
1457
  else
1304
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1305
 
    soname_spec='${libname}${release}.so$major'
 
1458
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
 
1459
    soname_spec='${libname}${release}${shared_ext}$major'
1306
1460
    dynamic_linker='NetBSD ld.elf_so'
1307
1461
  fi
1308
1462
  shlibpath_var=LD_LIBRARY_PATH
1312
1466
 
1313
1467
newsos6)
1314
1468
  version_type=linux
1315
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
1469
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1316
1470
  shlibpath_var=LD_LIBRARY_PATH
1317
1471
  shlibpath_overrides_runpath=yes
1318
1472
  ;;
1319
1473
 
1320
 
nto-qnx)
 
1474
nto-qnx*)
1321
1475
  version_type=linux
1322
1476
  need_lib_prefix=no
1323
1477
  need_version=no
1324
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1325
 
  soname_spec='${libname}${release}.so$major'
 
1478
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1479
  soname_spec='${libname}${release}${shared_ext}$major'
1326
1480
  shlibpath_var=LD_LIBRARY_PATH
1327
1481
  shlibpath_overrides_runpath=yes
1328
1482
  ;;
1331
1485
  version_type=sunos
1332
1486
  need_lib_prefix=no
1333
1487
  need_version=no
1334
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
1488
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1335
1489
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1336
1490
  shlibpath_var=LD_LIBRARY_PATH
1337
1491
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1350
1504
 
1351
1505
os2*)
1352
1506
  libname_spec='$name'
 
1507
  shrext=".dll"
1353
1508
  need_lib_prefix=no
1354
 
  library_names_spec='$libname.dll $libname.a'
 
1509
  library_names_spec='$libname${shared_ext} $libname.a'
1355
1510
  dynamic_linker='OS/2 ld.exe'
1356
1511
  shlibpath_var=LIBPATH
1357
1512
  ;;
1360
1515
  version_type=osf
1361
1516
  need_lib_prefix=no
1362
1517
  need_version=no
1363
 
  soname_spec='${libname}${release}.so'
1364
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
1518
  soname_spec='${libname}${release}${shared_ext}$major'
 
1519
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1365
1520
  shlibpath_var=LD_LIBRARY_PATH
1366
1521
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1367
1522
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1369
1524
 
1370
1525
sco3.2v5*)
1371
1526
  version_type=osf
1372
 
  soname_spec='${libname}${release}.so$major'
1373
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
1527
  soname_spec='${libname}${release}${shared_ext}$major'
 
1528
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1374
1529
  shlibpath_var=LD_LIBRARY_PATH
1375
1530
  ;;
1376
1531
 
1378
1533
  version_type=linux
1379
1534
  need_lib_prefix=no
1380
1535
  need_version=no
1381
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1382
 
  soname_spec='${libname}${release}.so$major'
 
1536
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1537
  soname_spec='${libname}${release}${shared_ext}$major'
1383
1538
  shlibpath_var=LD_LIBRARY_PATH
1384
1539
  shlibpath_overrides_runpath=yes
1385
1540
  hardcode_into_libs=yes
1389
1544
 
1390
1545
sunos4*)
1391
1546
  version_type=sunos
1392
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
1547
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1393
1548
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1394
1549
  shlibpath_var=LD_LIBRARY_PATH
1395
1550
  shlibpath_overrides_runpath=yes
1401
1556
 
1402
1557
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1403
1558
  version_type=linux
1404
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1405
 
  soname_spec='${libname}${release}.so$major'
 
1559
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1560
  soname_spec='${libname}${release}${shared_ext}$major'
1406
1561
  shlibpath_var=LD_LIBRARY_PATH
1407
1562
  case $host_vendor in
1408
1563
    sni)
1409
1564
      shlibpath_overrides_runpath=no
 
1565
      need_lib_prefix=no
 
1566
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
1567
      runpath_var=LD_RUN_PATH
 
1568
      ;;
 
1569
    siemens)
 
1570
      need_lib_prefix=no
1410
1571
      ;;
1411
1572
    motorola)
1412
1573
      need_lib_prefix=no
1420
1581
sysv4*MP*)
1421
1582
  if test -d /usr/nec ;then
1422
1583
    version_type=linux
1423
 
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1424
 
    soname_spec='$libname.so.$major'
 
1584
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
1585
    soname_spec='$libname${shared_ext}.$major'
1425
1586
    shlibpath_var=LD_LIBRARY_PATH
1426
1587
  fi
1427
1588
  ;;
1428
1589
 
1429
1590
uts4*)
1430
1591
  version_type=linux
1431
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1432
 
  soname_spec='${libname}${release}.so$major'
 
1592
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1593
  soname_spec='${libname}${release}${shared_ext}$major'
1433
1594
  shlibpath_var=LD_LIBRARY_PATH
1434
1595
  ;;
1435
1596
 
1446
1607
# ----------------
1447
1608
AC_DEFUN([_LT_AC_TAGCONFIG],
1448
1609
[AC_ARG_WITH([tags],
1449
 
    [AC_HELP_STRING([--with-tags=TAGS],
1450
 
        [include additional configurations @<:@CXX,GCJ@:>@])],
1451
 
    [tagnames="$withval"],
1452
 
    [tagnames="CXX,GCJ"
1453
 
    case $host_os in
1454
 
      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
1455
 
    esac])
 
1610
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
1611
        [include additional configurations @<:@automatic@:>@])],
 
1612
    [tagnames="$withval"])
1456
1613
 
1457
1614
if test -f "$ltmain" && test -n "$tagnames"; then
1458
1615
  if test ! -f "${ofile}"; then
1470
1627
 
1471
1628
  # Extract list of available tagged configurations in $ofile.
1472
1629
  # Note that this assumes the entire list is on one line.
1473
 
  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
1630
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1474
1631
 
1475
1632
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1476
1633
  for tagname in $tagnames; do
1493
1650
 
1494
1651
      case $tagname in
1495
1652
      CXX)
1496
 
        AC_LIBTOOL_LANG_CXX_CONFIG
 
1653
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
 
1654
          AC_LIBTOOL_LANG_CXX_CONFIG
 
1655
        else
 
1656
          tagname=""
 
1657
        fi
 
1658
        ;;
 
1659
 
 
1660
      F77)
 
1661
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
1662
          AC_LIBTOOL_LANG_F77_CONFIG
 
1663
        else
 
1664
          tagname=""
 
1665
        fi
1497
1666
        ;;
1498
1667
 
1499
1668
      GCJ)
1500
 
        AC_LIBTOOL_LANG_GCJ_CONFIG
 
1669
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
1670
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
1671
        else
 
1672
          tagname=""
 
1673
        fi
1501
1674
        ;;
1502
1675
 
1503
1676
      RC)
1510
1683
      esac
1511
1684
 
1512
1685
      # Append the new tag name to the list of available tags.
 
1686
      if test -n "$tagname" ; then
1513
1687
      available_tags="$available_tags $tagname"
1514
1688
    fi
 
1689
    fi
1515
1690
  done
1516
1691
  IFS="$lt_save_ifs"
1517
1692
 
1670
1845
])# AC_LIBTOOL_PICMODE
1671
1846
 
1672
1847
 
 
1848
# AC_PROG_EGREP
 
1849
# -------------
 
1850
# This is predefined starting with Autoconf 2.54, so this conditional
 
1851
# definition can be removed once we require Autoconf 2.54 or later.
 
1852
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
1853
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
1854
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
1855
    then ac_cv_prog_egrep='grep -E'
 
1856
    else ac_cv_prog_egrep='egrep'
 
1857
    fi])
 
1858
 EGREP=$ac_cv_prog_egrep
 
1859
 AC_SUBST([EGREP])
 
1860
])])
 
1861
 
 
1862
 
1673
1863
# AC_PATH_TOOL_PREFIX
1674
1864
# -------------------
1675
1865
# find a file program which can recognise shared library
1676
1866
AC_DEFUN([AC_PATH_TOOL_PREFIX],
1677
 
[AC_MSG_CHECKING([for $1])
 
1867
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
1868
AC_MSG_CHECKING([for $1])
1678
1869
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1679
1870
[case $MAGIC_CMD in
1680
1871
[[\\/*] |  ?:[\\/]*])
1698
1889
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1699
1890
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1700
1891
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1701
 
            egrep "$file_magic_regex" > /dev/null; then
 
1892
            $EGREP "$file_magic_regex" > /dev/null; then
1702
1893
            :
1703
1894
          else
1704
1895
            cat <<EOF 1>&2
1749
1940
 
1750
1941
# AC_PROG_LD
1751
1942
# ----------
1752
 
# find the path to the GNU or non-GNU linker
 
1943
# find the pathname to the GNU or non-GNU linker
1753
1944
AC_DEFUN([AC_PROG_LD],
1754
1945
[AC_ARG_WITH([gnu-ld],
1755
1946
    [AC_HELP_STRING([--with-gnu-ld],
1756
1947
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1757
1948
    [test "$withval" = no || with_gnu_ld=yes],
1758
1949
    [with_gnu_ld=no])
 
1950
AC_REQUIRE([LT_AC_PROG_SED])dnl
1759
1951
AC_REQUIRE([AC_PROG_CC])dnl
1760
1952
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1761
1953
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1762
1954
ac_prog=ld
1763
1955
if test "$GCC" = yes; then
1764
1956
  # Check if gcc -print-prog-name=ld gives a path.
1765
 
  AC_MSG_CHECKING([for ld used by GCC])
 
1957
  AC_MSG_CHECKING([for ld used by $CC])
1766
1958
  case $host in
1767
1959
  *-*-mingw*)
1768
1960
    # gcc leaves a trailing carriage return which upsets mingw
1774
1966
    # Accept absolute paths.
1775
1967
    [[\\/]]* | ?:[[\\/]]*)
1776
1968
      re_direlt='/[[^/]][[^/]]*/\.\./'
1777
 
      # Canonicalize the path of ld
1778
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
1969
      # Canonicalize the pathname of ld
 
1970
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
1779
1971
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1780
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
1972
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
1781
1973
      done
1782
1974
      test -z "$LD" && LD="$ac_prog"
1783
1975
      ;;
1806
1998
      # Check to see if the program is GNU ld.  I'd rather use --version,
1807
1999
      # but apparently some GNU ld's only accept -v.
1808
2000
      # Break only if it was the GNU/non-GNU ld that we prefer.
1809
 
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
2001
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
2002
      *GNU* | *'with BFD'*)
1810
2003
        test "$with_gnu_ld" != no && break
1811
 
      else
 
2004
        ;;
 
2005
      *)
1812
2006
        test "$with_gnu_ld" != yes && break
1813
 
      fi
 
2007
        ;;
 
2008
      esac
1814
2009
    fi
1815
2010
  done
1816
2011
  IFS="$lt_save_ifs"
1831
2026
# AC_PROG_LD_GNU
1832
2027
# --------------
1833
2028
AC_DEFUN([AC_PROG_LD_GNU],
1834
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
2029
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2030
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1835
2031
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1836
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 
2032
case `$LD -v 2>&1 </dev/null` in
 
2033
*GNU* | *'with BFD'*)
1837
2034
  lt_cv_prog_gnu_ld=yes
1838
 
else
 
2035
  ;;
 
2036
*)
1839
2037
  lt_cv_prog_gnu_ld=no
1840
 
fi])
 
2038
  ;;
 
2039
esac])
1841
2040
with_gnu_ld=$lt_cv_prog_gnu_ld
1842
2041
])# AC_PROG_LD_GNU
1843
2042
 
1864
2063
# how to check for library dependencies
1865
2064
#  -- PORTME fill in with the dynamic library characteristics
1866
2065
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1867
 
[AC_CACHE_CHECK([how to recognise dependant libraries],
 
2066
[AC_CACHE_CHECK([how to recognise dependent libraries],
1868
2067
lt_cv_deplibs_check_method,
1869
2068
[lt_cv_file_magic_cmd='$MAGIC_CMD'
1870
2069
lt_cv_file_magic_test_file=
1876
2075
# 'pass_all' -- all dependencies passed with no checks.
1877
2076
# 'test_compile' -- check by making test program.
1878
2077
# 'file_magic [[regex]]' -- check by looking for files in library path
1879
 
# which responds to the $file_magic_cmd with a given egrep regex.
 
2078
# which responds to the $file_magic_cmd with a given extended regex.
1880
2079
# If you have `file' or equivalent on your system and you're not sure
1881
2080
# whether `pass_all' will *always* work, you probably want this one.
1882
2081
 
1895
2094
  lt_cv_file_magic_test_file=/shlib/libc.so
1896
2095
  ;;
1897
2096
 
1898
 
cygwin* | mingw* | pw32*)
1899
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1900
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2097
cygwin*)
 
2098
  lt_cv_deplibs_check_method=pass_all
 
2099
  ;;
 
2100
  
 
2101
mingw* | pw32*)
 
2102
  # win32_libid is a shell function defined in ltmain.sh
 
2103
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2104
  lt_cv_file_magic_cmd='win32_libid'
1901
2105
  ;;
1902
2106
 
1903
2107
darwin* | rhapsody*)
 
2108
  # this will be overwritten by pass_all, but leave it in just in case
1904
2109
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1905
2110
  lt_cv_file_magic_cmd='/usr/bin/file -L'
1906
2111
  case "$host_os" in
1911
2116
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1912
2117
    ;;
1913
2118
  esac
 
2119
  lt_cv_deplibs_check_method=pass_all
1914
2120
  ;;
1915
2121
 
1916
2122
freebsd*)
1935
2141
 
1936
2142
hpux10.20* | hpux11*)
1937
2143
  lt_cv_file_magic_cmd=/usr/bin/file
1938
 
  if test "$host_cpu" = ia64; then
 
2144
  case "$host_cpu" in
 
2145
  ia64*)
1939
2146
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
1940
2147
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1941
 
  else
 
2148
    ;;
 
2149
  hppa*64*)
 
2150
    [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]']
 
2151
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
2152
    ;;
 
2153
  *)
1942
2154
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
1943
2155
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
1944
 
  fi
 
2156
    ;;
 
2157
  esac
1945
2158
  ;;
1946
2159
 
1947
2160
irix5* | irix6* | nonstopux*)
1968
2181
# This must be Linux ELF.
1969
2182
linux*)
1970
2183
  case $host_cpu in
1971
 
  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
 
2184
  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
 
2185
    lt_cv_deplibs_check_method=pass_all ;;
 
2186
  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
 
2187
  arm* )
1972
2188
    lt_cv_deplibs_check_method=pass_all ;;
1973
2189
  *)
1974
2190
    # glibc up to 2.1.1 does not perform some relocations on ARM
1979
2195
 
1980
2196
netbsd*)
1981
2197
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1982
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
 
2198
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
1983
2199
  else
1984
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
 
2200
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
1985
2201
  fi
1986
2202
  ;;
1987
2203
 
1991
2207
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
1992
2208
  ;;
1993
2209
 
1994
 
nto-qnx)
 
2210
nto-qnx*)
1995
2211
  lt_cv_deplibs_check_method=unknown
1996
2212
  ;;
1997
2213
 
2039
2255
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2040
2256
    lt_cv_file_magic_test_file=/lib/libc.so
2041
2257
    ;;
 
2258
  siemens)
 
2259
    lt_cv_deplibs_check_method=pass_all
 
2260
    ;;
2042
2261
  esac
2043
2262
  ;;
2044
2263
 
2055
2274
 
2056
2275
# AC_PROG_NM
2057
2276
# ----------
2058
 
# find the path to a BSD-compatible name lister
 
2277
# find the pathname to a BSD-compatible name lister
2059
2278
AC_DEFUN([AC_PROG_NM],
2060
2279
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2061
2280
[if test -n "$NM"; then
2072
2291
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2073
2292
      #   nm: unknown option "B" ignored
2074
2293
      # Tru64's nm complains that /dev/null is an invalid object file
2075
 
      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 
2294
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
2295
      */dev/null* | *'Invalid file or object type'*)
2076
2296
        lt_cv_path_NM="$tmp_nm -B"
2077
2297
        break
2078
 
      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2079
 
        lt_cv_path_NM="$tmp_nm -p"
2080
 
        break
2081
 
      else
2082
 
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2083
 
        continue # so that we can try to find one that supports BSD flags
2084
 
      fi
 
2298
        ;;
 
2299
      *)
 
2300
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
2301
        */dev/null*)
 
2302
          lt_cv_path_NM="$tmp_nm -p"
 
2303
          break
 
2304
          ;;
 
2305
        *)
 
2306
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
2307
          continue # so that we can try to find one that supports BSD flags
 
2308
          ;;
 
2309
        esac
 
2310
      esac
2085
2311
    fi
2086
2312
  done
2087
2313
  IFS="$lt_save_ifs"
2098
2324
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2099
2325
LIBM=
2100
2326
case $host in
2101
 
*-*-beos* | *-*-cygwin* | *-*-pw32*)
2102
 
  # These system don't have libm
 
2327
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
2328
  # These system don't have libm, or don't need it
2103
2329
  ;;
2104
2330
*-ncr-sysv4.3*)
2105
2331
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2106
 
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
 
2332
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2107
2333
  ;;
2108
2334
*)
2109
 
  AC_CHECK_LIB(m, main, LIBM="-lm")
 
2335
  AC_CHECK_LIB(m, cos, LIBM="-lm")
2110
2336
  ;;
2111
2337
esac
2112
2338
])# AC_CHECK_LIBM
2151
2377
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2152
2378
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2153
2379
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2154
 
  AC_CHECK_LIB(ltdl, main,
 
2380
  AC_CHECK_LIB(ltdl, lt_dlinit,
2155
2381
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2156
2382
  [if test x"$enable_ltdl_install" = xno; then
2157
2383
     AC_MSG_WARN([libltdl not installed, but installation disabled])
2173
2399
])# AC_LIBLTDL_INSTALLABLE
2174
2400
 
2175
2401
 
2176
 
# If this macro is not defined by Autoconf, define it here.
2177
 
ifdef([AC_PROVIDE_IFELSE],
2178
 
      [],
2179
 
      [define([AC_PROVIDE_IFELSE],
2180
 
              [ifdef([AC_PROVIDE_$1],
2181
 
                     [$2], [$3])])])
2182
 
 
2183
 
 
2184
2402
# AC_LIBTOOL_CXX
2185
2403
# --------------
2186
2404
# enable support for C++ libraries
2194
2412
AC_DEFUN([_LT_AC_LANG_CXX],
2195
2413
[AC_REQUIRE([AC_PROG_CXX])
2196
2414
AC_REQUIRE([AC_PROG_CXXCPP])
 
2415
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2197
2416
])# _LT_AC_LANG_CXX
2198
2417
 
2199
2418
 
 
2419
# AC_LIBTOOL_F77
 
2420
# --------------
 
2421
# enable support for Fortran 77 libraries
 
2422
AC_DEFUN([AC_LIBTOOL_F77],
 
2423
[AC_REQUIRE([_LT_AC_LANG_F77])
 
2424
])# AC_LIBTOOL_F77
 
2425
 
 
2426
 
 
2427
# _LT_AC_LANG_F77
 
2428
# ---------------
 
2429
AC_DEFUN([_LT_AC_LANG_F77],
 
2430
[AC_REQUIRE([AC_PROG_F77])
 
2431
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
2432
])# _LT_AC_LANG_F77
 
2433
 
 
2434
 
2200
2435
# AC_LIBTOOL_GCJ
2201
2436
# --------------
2202
2437
# enable support for GCJ libraries
2214
2449
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2215
2450
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2216
2451
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
2452
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2217
2453
])# _LT_AC_LANG_GCJ
2218
2454
 
2219
2455
 
2221
2457
# --------------
2222
2458
# enable support for Windows resource files
2223
2459
AC_DEFUN([AC_LIBTOOL_RC],
2224
 
[AC_REQUIRE([AC_PROG_RC])
 
2460
[AC_REQUIRE([LT_AC_PROG_RC])
 
2461
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2225
2462
])# AC_LIBTOOL_RC
2226
2463
 
2227
2464
 
2243
2480
_LT_AC_TAGVAR(objext, $1)=$objext
2244
2481
 
2245
2482
# Code to be used in simple compile tests
2246
 
lt_simple_compile_test_code="int some_variable = 0;"
 
2483
lt_simple_compile_test_code="int some_variable = 0;\n"
2247
2484
 
2248
2485
# Code to be used in simple link tests
2249
 
lt_simple_link_test_code='main(){return(0);}'
 
2486
lt_simple_link_test_code='int main(){return(0);}\n'
2250
2487
 
2251
2488
_LT_AC_SYS_COMPILER
2252
2489
 
2263
2500
fi
2264
2501
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2265
2502
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2266
 
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
 
2503
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
2267
2504
  else
2268
2505
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2269
2506
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2290
2527
AC_LIBTOOL_PROG_CC_C_O($1)
2291
2528
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2292
2529
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
2530
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2293
2531
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2294
2532
AC_LIBTOOL_SYS_LIB_STRIP
2295
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2296
2533
AC_LIBTOOL_DLOPEN_SELF($1)
2297
2534
 
2298
2535
# Report which librarie types wil actually be built
2318
2555
    test "$enable_shared" = yes && enable_static=no
2319
2556
  fi
2320
2557
  ;;
 
2558
  darwin* | rhapsody*)
 
2559
  if test "$GCC" = yes; then
 
2560
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
2561
    case "$host_os" in
 
2562
    rhapsody* | darwin1.[[012]])
 
2563
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
 
2564
      ;;
 
2565
    *) # Darwin 1.3 on
 
2566
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
2567
        allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
2568
      else
 
2569
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
2570
          10.[012])
 
2571
            allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
2572
            ;;
 
2573
          10.*)
 
2574
            allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
 
2575
            ;;
 
2576
        esac
 
2577
      fi
 
2578
      ;;
 
2579
    esac
 
2580
    output_verbose_link_cmd='echo'
 
2581
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
 
2582
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
 
2583
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
2584
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2585
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2586
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
2587
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
2588
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2589
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
2590
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
2591
  else
 
2592
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2593
  fi  
 
2594
    ;;  
2321
2595
esac
2322
2596
AC_MSG_RESULT([$enable_shared])
2323
2597
 
2351
2625
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2352
2626
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2353
2627
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
2628
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2354
2629
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2355
2630
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
2631
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
2632
_LT_AC_TAGVAR(module_cmds, $1)=
 
2633
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2356
2634
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2357
2635
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2358
2636
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2359
2637
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2638
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2360
2639
 
2361
2640
# Dependencies to place before and after the object being linked:
2362
2641
_LT_AC_TAGVAR(predep_objects, $1)=
2365
2644
_LT_AC_TAGVAR(postdeps, $1)=
2366
2645
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2367
2646
 
2368
 
# Source file extension for C test sources.
 
2647
# Source file extension for C++ test sources.
2369
2648
ac_ext=cc
2370
2649
 
2371
 
# Object file extension for compiled C test sources.
 
2650
# Object file extension for compiled C++ test sources.
2372
2651
objext=o
2373
2652
_LT_AC_TAGVAR(objext, $1)=$objext
2374
2653
 
2375
2654
# Code to be used in simple compile tests
2376
 
lt_simple_compile_test_code="int some_variable = 0;"
 
2655
lt_simple_compile_test_code="int some_variable = 0;\n"
2377
2656
 
2378
2657
# Code to be used in simple link tests
2379
 
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
 
2658
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2380
2659
 
2381
2660
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2382
2661
_LT_AC_SYS_COMPILER
2383
2662
 
2384
2663
# Allow CC to be a program name with arguments.
2385
 
lt_save_CC="$CC"
 
2664
lt_save_CC=$CC
 
2665
lt_save_LD=$LD
 
2666
lt_save_GCC=$GCC
 
2667
GCC=$GXX
 
2668
lt_save_with_gnu_ld=$with_gnu_ld
 
2669
lt_save_path_LD=$lt_cv_path_LD
 
2670
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
2671
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
2672
else
 
2673
  unset lt_cv_prog_gnu_ld
 
2674
fi
 
2675
if test -n "${lt_cv_path_LDCXX+set}"; then
 
2676
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
2677
else
 
2678
  unset lt_cv_path_LD
 
2679
fi
 
2680
test -z "${LDCXX+set}" || LD=$LDCXX
2386
2681
CC=${CXX-"c++"}
2387
 
set dummy $CC
2388
 
compiler="[$]2"
 
2682
compiler=$CC
2389
2683
_LT_AC_TAGVAR(compiler, $1)=$CC
2390
2684
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2391
2685
 
2400
2694
if test "$GXX" = yes; then
2401
2695
  # Set up default GNU C++ configuration
2402
2696
 
 
2697
  AC_PROG_LD
 
2698
 
2403
2699
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2404
2700
  # archiving commands below assume that GNU ld is being used.
2405
 
  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2406
 
      egrep 'GNU ld' > /dev/null; then
2407
 
    with_gnu_ld=yes
2408
 
 
2409
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2410
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
2701
  if test "$with_gnu_ld" = yes; then
 
2702
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
 
2703
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2411
2704
 
2412
2705
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2413
2706
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2419
2712
 
2420
2713
    # ancient GNU ld didn't support --whole-archive et. al.
2421
2714
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2422
 
        egrep 'no-whole-archive' > /dev/null; then
 
2715
        grep 'no-whole-archive' > /dev/null; then
2423
2716
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2424
2717
    else
2425
2718
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2433
2726
    # linker, instead of GNU ld.  If possible, this setting should
2434
2727
    # overridden to take advantage of the native linker features on
2435
2728
    # the platform it is being used on.
2436
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
2729
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
2437
2730
  fi
2438
2731
 
2439
2732
  # Commands to make compiler produce verbose output that lists
2440
2733
  # what "hidden" libraries, object files and flags are used when
2441
2734
  # linking a shared library.
2442
 
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
2735
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2443
2736
 
2444
2737
else
2445
2738
  GXX=no
2527
2820
      _LT_AC_SYS_LIBPATH_AIX
2528
2821
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2529
2822
 
2530
 
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
2531
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
2823
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
2824
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2532
2825
     else
2533
2826
      if test "$host_cpu" = ia64; then
2534
2827
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2535
2828
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2536
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
2829
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2537
2830
      else
2538
2831
        # Determine the default libpath from the value encoded in an empty executable.
2539
2832
        _LT_AC_SYS_LIBPATH_AIX
2548
2841
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2549
2842
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2550
2843
        # This is similar to how AIX traditionally builds it's shared libraries.
2551
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
2844
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2552
2845
      fi
2553
2846
    fi
2554
2847
    ;;
2560
2853
        ;;
2561
2854
    esac
2562
2855
    ;;
 
2856
 
 
2857
  cygwin* | mingw* | pw32*)
 
2858
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
2859
    # as there is no search path for DLLs.
 
2860
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
2861
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
 
2862
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
2863
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
2864
 
 
2865
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
2866
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
2867
      # If the export-symbols file already is a .def file (1st line
 
2868
      # is EXPORTS), use it as is; otherwise, prepend...
 
2869
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
2870
        cp $export_symbols $output_objdir/$soname.def;
 
2871
      else
 
2872
        echo EXPORTS > $output_objdir/$soname.def;
 
2873
        cat $export_symbols >> $output_objdir/$soname.def;
 
2874
      fi~
 
2875
      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
2876
    else
 
2877
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2878
    fi
 
2879
  ;;
 
2880
 
 
2881
  darwin* | rhapsody*)
 
2882
  if test "$GXX" = yes; then
 
2883
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
2884
    case "$host_os" in
 
2885
    rhapsody* | darwin1.[[012]])
 
2886
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
 
2887
      ;;
 
2888
    *) # Darwin 1.3 on
 
2889
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
2890
        allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
2891
      else
 
2892
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
2893
          10.[012])
 
2894
            allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
2895
            ;;
 
2896
          10.*)
 
2897
            allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
 
2898
            ;;
 
2899
        esac
 
2900
      fi
 
2901
      ;;
 
2902
    esac
 
2903
    lt_int_apple_cc_single_mod=no
 
2904
    output_verbose_link_cmd='echo'
 
2905
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
2906
      lt_int_apple_cc_single_mod=yes
 
2907
    fi
 
2908
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
2909
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
 
2910
    else
 
2911
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
 
2912
    fi
 
2913
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
 
2914
 
 
2915
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
2916
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
2917
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2918
    else
 
2919
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2920
    fi
 
2921
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2922
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
2923
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
2924
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2925
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
2926
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
2927
  else
 
2928
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2929
  fi
 
2930
    ;;
 
2931
 
2563
2932
  dgux*)
2564
2933
    case $cc_basename in
2565
2934
      ec++)
2591
2960
    ;;
2592
2961
  gnu*)
2593
2962
    ;;
2594
 
  hpux*)
 
2963
  hpux9*)
 
2964
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
2965
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
2966
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
2967
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2968
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
2969
                                # but as the default
 
2970
                                # location of the library.
 
2971
 
 
2972
    case $cc_basename in
 
2973
    CC)
 
2974
      # FIXME: insert proper C++ library support
 
2975
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2976
      ;;
 
2977
    aCC)
 
2978
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
2979
      # Commands to make compiler produce verbose output that lists
 
2980
      # what "hidden" libraries, object files and flags are used when
 
2981
      # linking a shared library.
 
2982
      #
 
2983
      # There doesn't appear to be a way to prevent this compiler from
 
2984
      # explicitly linking system object files so we need to strip them
 
2985
      # from the output so that they don't get included in the library
 
2986
      # dependencies.
 
2987
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
2988
      ;;
 
2989
    *)
 
2990
      if test "$GXX" = yes; then
 
2991
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
2992
      else
 
2993
        # FIXME: insert proper C++ library support
 
2994
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2995
      fi
 
2996
      ;;
 
2997
    esac
 
2998
    ;;
 
2999
  hpux10*|hpux11*)
2595
3000
    if test $with_gnu_ld = no; then
2596
 
      if test "$host_cpu" = ia64; then
 
3001
      case "$host_cpu" in
 
3002
      hppa*64*)
 
3003
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3004
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
3005
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3006
        ;;
 
3007
      ia64*)
2597
3008
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2598
 
      else
 
3009
        ;;
 
3010
      *)
2599
3011
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2600
3012
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2601
3013
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2602
 
      fi
 
3014
        ;;
 
3015
      esac
2603
3016
    fi
2604
 
    if test "$host_cpu" = ia64; then
2605
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
2606
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2607
 
    else
 
3017
    case "$host_cpu" in
 
3018
    hppa*64*)
 
3019
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3020
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3021
      ;;
 
3022
    ia64*)
 
3023
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3024
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3025
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3026
                                              # but as the default
 
3027
                                              # location of the library.
 
3028
      ;;
 
3029
    *)
2608
3030
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2609
 
    fi
2610
 
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2611
 
                                            # but as the default
2612
 
                                            # location of the library.
 
3031
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3032
                                              # but as the default
 
3033
                                              # location of the library.
 
3034
      ;;
 
3035
    esac
2613
3036
 
2614
3037
    case $cc_basename in
2615
3038
      CC)
2617
3040
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2618
3041
        ;;
2619
3042
      aCC)
2620
 
        case $host_os in
2621
 
        hpux9*)
2622
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3043
        case "$host_cpu" in
 
3044
        hppa*64*|ia64*)
 
3045
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2623
3046
          ;;
2624
3047
        *)
2625
 
          if test "$host_cpu" = ia64; then
2626
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2627
 
          else
2628
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2629
 
          fi
 
3048
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
2630
3049
          ;;
2631
3050
        esac
2632
3051
        # Commands to make compiler produce verbose output that lists
2637
3056
        # explicitly linking system object files so we need to strip them
2638
3057
        # from the output so that they don't get included in the library
2639
3058
        # dependencies.
2640
 
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3059
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2641
3060
        ;;
2642
3061
      *)
2643
3062
        if test "$GXX" = yes; then
2644
3063
          if test $with_gnu_ld = no; then
2645
 
            case $host_os in
2646
 
            hpux9*)
2647
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3064
            case "$host_cpu" in
 
3065
            ia64*|hppa*64*)
 
3066
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2648
3067
              ;;
2649
3068
            *)
2650
 
              if test "$host_cpu" = ia64; then
2651
 
                _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2652
 
              else
2653
 
                _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2654
 
              fi
 
3069
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
2655
3070
              ;;
2656
3071
            esac
2657
3072
          fi
2666
3081
    case $cc_basename in
2667
3082
      CC)
2668
3083
        # SGI C++
2669
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
3084
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
2670
3085
 
2671
3086
        # Archives containing C++ object files must be created using
2672
3087
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
2677
3092
      *)
2678
3093
        if test "$GXX" = yes; then
2679
3094
          if test "$with_gnu_ld" = no; then
2680
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
3095
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
2681
3096
          else
2682
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
 
3097
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
2683
3098
          fi
2684
3099
        fi
2685
3100
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2696
3111
        # KCC will only create a shared library if the output file
2697
3112
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
2698
3113
        # to its proper name (with version) after linking.
2699
 
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2700
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2701
 
 
 
3114
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
 
3115
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2702
3116
        # Commands to make compiler produce verbose output that lists
2703
3117
        # what "hidden" libraries, object files and flags are used when
2704
3118
        # linking a shared library.
2707
3121
        # explicitly linking system object files so we need to strip them
2708
3122
        # from the output so that they don't get included in the library
2709
3123
        # dependencies.
2710
 
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3124
        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 $list'
2711
3125
 
2712
3126
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
2713
3127
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2716
3130
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2717
3131
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2718
3132
        ;;
 
3133
      icpc)
 
3134
        # Intel C++
 
3135
        with_gnu_ld=yes
 
3136
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3137
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
 
3138
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3139
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3140
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3141
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
3142
        ;;
2719
3143
      cxx)
2720
3144
        # Compaq C++
2721
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2722
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
3145
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
 
3146
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
2723
3147
 
2724
3148
        runpath_var=LD_RUN_PATH
2725
3149
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2733
3157
        # explicitly linking system object files so we need to strip them
2734
3158
        # from the output so that they don't get included in the library
2735
3159
        # dependencies.
2736
 
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
 
3160
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
2737
3161
        ;;
2738
3162
    esac
2739
3163
    ;;
2758
3182
    esac
2759
3183
    ;;
2760
3184
  netbsd*)
2761
 
    # NetBSD uses g++ - do we need to do anything?
 
3185
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
3186
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
3187
      wlarc=
 
3188
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3189
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3190
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3191
    fi
 
3192
    # Workaround some broken pre-1.5 toolchains
 
3193
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
2762
3194
    ;;
2763
3195
  osf3*)
2764
3196
    case $cc_basename in
2768
3200
        # KCC will only create a shared library if the output file
2769
3201
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
2770
3202
        # to its proper name (with version) after linking.
2771
 
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
3203
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
2772
3204
 
2773
3205
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2774
3206
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2785
3217
        ;;
2786
3218
      cxx)
2787
3219
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2788
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
3220
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
2789
3221
 
2790
3222
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2791
3223
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2798
3230
        # explicitly linking system object files so we need to strip them
2799
3231
        # from the output so that they don't get included in the library
2800
3232
        # dependencies.
2801
 
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
 
3233
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
2802
3234
        ;;
2803
3235
      *)
2804
3236
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2805
3237
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2806
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
3238
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
2807
3239
 
2808
3240
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2809
3241
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2811
3243
          # Commands to make compiler produce verbose output that lists
2812
3244
          # what "hidden" libraries, object files and flags are used when
2813
3245
          # linking a shared library.
2814
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
3246
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2815
3247
 
2816
3248
        else
2817
3249
          # FIXME: insert proper C++ library support
2828
3260
        # KCC will only create a shared library if the output file
2829
3261
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
2830
3262
        # to its proper name (with version) after linking.
2831
 
        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
3263
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
2832
3264
 
2833
3265
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2834
3266
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2844
3276
        ;;
2845
3277
      cxx)
2846
3278
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
2847
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
2848
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
 
3279
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
3280
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
2849
3281
          echo "-hidden">> $lib.exp~
2850
 
          $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 $objdir/so_locations -o $lib~
 
3282
          $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
2851
3283
          $rm $lib.exp'
2852
3284
 
2853
3285
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2861
3293
        # explicitly linking system object files so we need to strip them
2862
3294
        # from the output so that they don't get included in the library
2863
3295
        # dependencies.
2864
 
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
 
3296
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
2865
3297
        ;;
2866
3298
      *)
2867
3299
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2868
3300
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2869
 
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
3301
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
2870
3302
 
2871
3303
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2872
3304
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2874
3306
          # Commands to make compiler produce verbose output that lists
2875
3307
          # what "hidden" libraries, object files and flags are used when
2876
3308
          # linking a shared library.
2877
 
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
 
3309
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2878
3310
 
2879
3311
        else
2880
3312
          # FIXME: insert proper C++ library support
2923
3355
      CC)
2924
3356
        # Sun C++ 4.2, 5.x and Centerline C++
2925
3357
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
2926
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2927
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2928
 
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3358
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
 
3359
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3360
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2929
3361
 
2930
3362
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2931
3363
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2949
3381
        # explicitly linking system object files so we need to strip them
2950
3382
        # from the output so that they don't get included in the library
2951
3383
        # dependencies.
2952
 
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3384
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2953
3385
 
2954
3386
        # Archives containing C++ object files must be created using
2955
3387
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
2959
3391
        ;;
2960
3392
      gcx)
2961
3393
        # Green Hills C++ Compiler
2962
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3394
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
2963
3395
 
2964
3396
        # The C++ compiler must be used to create the archive.
2965
3397
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
2968
3400
        # GNU C++ compiler with Solaris linker
2969
3401
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2970
3402
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
2971
 
          if $CC --version | egrep -v '^2\.7' > /dev/null; then
2972
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2973
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2974
 
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
 
3403
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
3404
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
 
3405
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3406
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2975
3407
 
2976
3408
            # Commands to make compiler produce verbose output that lists
2977
3409
            # what "hidden" libraries, object files and flags are used when
2978
3410
            # linking a shared library.
2979
 
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
 
3411
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
2980
3412
          else
2981
3413
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
2982
3414
            # platform.
2983
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2984
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2985
 
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
 
3415
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
 
3416
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3417
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2986
3418
 
2987
3419
            # Commands to make compiler produce verbose output that lists
2988
3420
            # what "hidden" libraries, object files and flags are used when
2989
3421
            # linking a shared library.
2990
 
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
 
3422
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
2991
3423
          fi
2992
3424
 
2993
3425
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3023
3455
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3024
3456
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3025
3457
 
3026
 
# Figure out "hidden" C++ library dependencies from verbose
3027
 
# compiler output whening linking a shared library.
3028
 
cat > conftest.$ac_ext <<EOF
 
3458
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
3459
_LT_AC_TAGVAR(LD, $1)="$LD"
 
3460
 
 
3461
## CAVEAT EMPTOR:
 
3462
## There is no encapsulation within the following macros, do not change
 
3463
## the running order or otherwise move them around unless you know exactly
 
3464
## what you are doing...
 
3465
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
3466
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3467
AC_LIBTOOL_PROG_CC_C_O($1)
 
3468
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3469
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3470
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3471
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3472
AC_LIBTOOL_SYS_LIB_STRIP
 
3473
AC_LIBTOOL_DLOPEN_SELF($1)
 
3474
 
 
3475
AC_LIBTOOL_CONFIG($1)
 
3476
 
 
3477
AC_LANG_POP
 
3478
CC=$lt_save_CC
 
3479
LDCXX=$LD
 
3480
LD=$lt_save_LD
 
3481
GCC=$lt_save_GCC
 
3482
with_gnu_ldcxx=$with_gnu_ld
 
3483
with_gnu_ld=$lt_save_with_gnu_ld
 
3484
lt_cv_path_LDCXX=$lt_cv_path_LD
 
3485
lt_cv_path_LD=$lt_save_path_LD
 
3486
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
3487
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
3488
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
3489
 
 
3490
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
3491
# ------------------------
 
3492
# Figure out "hidden" library dependencies from verbose
 
3493
# compiler output when linking a shared library.
 
3494
# Parse the compiler output and extract the necessary
 
3495
# objects, libraries and library flags.
 
3496
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
3497
dnl we can't use the lt_simple_compile_test_code here,
 
3498
dnl because it contains code intended for an executable,
 
3499
dnl not a library.  It's possible we should let each
 
3500
dnl tag define a new lt_????_link_test_code variable,
 
3501
dnl but it's only used here...
 
3502
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
3503
int a;
 
3504
void foo (void) { a = 0; }
 
3505
EOF
 
3506
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3029
3507
class Foo
3030
3508
{
3031
3509
public:
3034
3512
  int a;
3035
3513
};
3036
3514
EOF
3037
 
 
3038
 
 
 
3515
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
3516
      subroutine foo
 
3517
      implicit none
 
3518
      integer*4 a
 
3519
      a=0
 
3520
      return
 
3521
      end
 
3522
EOF
 
3523
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
3524
public class foo {
 
3525
  private int a;
 
3526
  public void bar (void) {
 
3527
    a = 0;
 
3528
  }
 
3529
};
 
3530
EOF
 
3531
])
 
3532
dnl Parse the compiler output and extract the necessary
 
3533
dnl objects, libraries and library flags.
3039
3534
if AC_TRY_EVAL(ac_compile); then
3040
3535
  # Parse the compiler output and extract the necessary
3041
3536
  # objects, libraries and library flags.
3116
3611
  done
3117
3612
 
3118
3613
  # Clean up.
3119
 
  rm -f a.out
 
3614
  rm -f a.out a.exe
3120
3615
else
3121
 
  echo "libtool.m4: error: problem compiling C++ test program"
 
3616
  echo "libtool.m4: error: problem compiling $1 test program"
3122
3617
fi
3123
3618
 
3124
3619
$rm -f confest.$objext
3125
3620
 
3126
3621
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3127
3622
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3128
 
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3129
 
esac
3130
 
 
3131
 
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
3623
esac
 
3624
])# AC_LIBTOOL_POSTDEP_PREDEP
 
3625
 
 
3626
# AC_LIBTOOL_LANG_F77_CONFIG
 
3627
# ------------------------
 
3628
# Ensure that the configuration vars for the C compiler are
 
3629
# suitably defined.  Those variables are subsequently used by
 
3630
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3631
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
3632
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
3633
[AC_REQUIRE([AC_PROG_F77])
 
3634
AC_LANG_PUSH(Fortran 77)
 
3635
 
 
3636
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3637
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
3638
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3639
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
3640
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
3641
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3642
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
3643
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
3644
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3645
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
3646
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
3647
_LT_AC_TAGVAR(module_cmds, $1)=
 
3648
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
3649
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
3650
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
3651
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
3652
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3653
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
3654
 
 
3655
# Source file extension for f77 test sources.
 
3656
ac_ext=f
 
3657
 
 
3658
# Object file extension for compiled f77 test sources.
 
3659
objext=o
 
3660
_LT_AC_TAGVAR(objext, $1)=$objext
 
3661
 
 
3662
# Code to be used in simple compile tests
 
3663
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
3664
 
 
3665
# Code to be used in simple link tests
 
3666
lt_simple_link_test_code="      program t\n      end\n"
 
3667
 
 
3668
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3669
_LT_AC_SYS_COMPILER
 
3670
 
 
3671
# Allow CC to be a program name with arguments.
 
3672
lt_save_CC="$CC"
 
3673
CC=${F77-"f77"}
 
3674
compiler=$CC
 
3675
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3676
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
3677
 
 
3678
AC_MSG_CHECKING([if libtool supports shared libraries])
 
3679
AC_MSG_RESULT([$can_build_shared])
 
3680
 
 
3681
AC_MSG_CHECKING([whether to build shared libraries])
 
3682
test "$can_build_shared" = "no" && enable_shared=no
 
3683
 
 
3684
# On AIX, shared libraries and static libraries use the same namespace, and
 
3685
# are all built from PIC.
 
3686
case "$host_os" in
 
3687
aix3*)
 
3688
  test "$enable_shared" = yes && enable_static=no
 
3689
  if test -n "$RANLIB"; then
 
3690
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
3691
    postinstall_cmds='$RANLIB $lib'
 
3692
  fi
 
3693
  ;;
 
3694
aix4*)
 
3695
  test "$enable_shared" = yes && enable_static=no
 
3696
  ;;
 
3697
esac
 
3698
AC_MSG_RESULT([$enable_shared])
 
3699
 
 
3700
AC_MSG_CHECKING([whether to build static libraries])
 
3701
# Make sure either enable_shared or enable_static is yes.
 
3702
test "$enable_shared" = yes || enable_static=yes
 
3703
AC_MSG_RESULT([$enable_static])
 
3704
 
 
3705
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
3706
 
 
3707
_LT_AC_TAGVAR(GCC, $1)="$G77"
3132
3708
_LT_AC_TAGVAR(LD, $1)="$LD"
3133
3709
 
3134
 
## CAVEAT EMPTOR:
3135
 
## There is no encapsulation within the following macros, do not change
3136
 
## the running order or otherwise move them around unless you know exactly
3137
 
## what you are doing...
3138
3710
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3139
3711
AC_LIBTOOL_PROG_CC_C_O($1)
3140
3712
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3141
3713
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3714
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3142
3715
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3143
3716
AC_LIBTOOL_SYS_LIB_STRIP
3144
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3145
 
AC_LIBTOOL_DLOPEN_SELF($1)
 
3717
 
3146
3718
 
3147
3719
AC_LIBTOOL_CONFIG($1)
3148
3720
 
3149
3721
AC_LANG_POP
3150
3722
CC="$lt_save_CC"
3151
 
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
3723
])# AC_LIBTOOL_LANG_F77_CONFIG
3152
3724
 
3153
3725
 
3154
3726
# AC_LIBTOOL_LANG_GCJ_CONFIG
3160
3732
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3161
3733
[AC_LANG_SAVE
3162
3734
 
3163
 
# Source file extension for C test sources.
 
3735
# Source file extension for Java test sources.
3164
3736
ac_ext=java
3165
3737
 
3166
 
# Object file extension for compiled C test sources.
 
3738
# Object file extension for compiled Java test sources.
3167
3739
objext=o
3168
3740
_LT_AC_TAGVAR(objext, $1)=$objext
3169
3741
 
3170
3742
# Code to be used in simple compile tests
3171
 
lt_simple_compile_test_code="class foo {}"
 
3743
lt_simple_compile_test_code="class foo {}\n"
3172
3744
 
3173
3745
# Code to be used in simple link tests
3174
 
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
 
3746
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3175
3747
 
3176
3748
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3177
3749
_LT_AC_SYS_COMPILER
3179
3751
# Allow CC to be a program name with arguments.
3180
3752
lt_save_CC="$CC"
3181
3753
CC=${GCJ-"gcj"}
3182
 
set dummy $CC
3183
 
compiler="[$]2"
 
3754
compiler=$CC
3184
3755
_LT_AC_TAGVAR(compiler, $1)=$CC
3185
3756
 
3186
3757
# GCJ did not exist at the time GCC didn't implicitly link libc in.
3195
3766
AC_LIBTOOL_PROG_CC_C_O($1)
3196
3767
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3197
3768
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3769
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3198
3770
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3199
3771
AC_LIBTOOL_SYS_LIB_STRIP
3200
 
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3201
3772
AC_LIBTOOL_DLOPEN_SELF($1)
3202
3773
 
3203
3774
AC_LIBTOOL_CONFIG($1)
3224
3795
_LT_AC_TAGVAR(objext, $1)=$objext
3225
3796
 
3226
3797
# Code to be used in simple compile tests
3227
 
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
3798
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3228
3799
 
3229
3800
# Code to be used in simple link tests
3230
3801
lt_simple_link_test_code="$lt_simple_compile_test_code"
3235
3806
# Allow CC to be a program name with arguments.
3236
3807
lt_save_CC="$CC"
3237
3808
CC=${RC-"windres"}
3238
 
set dummy $CC
3239
 
compiler="[$]2"
 
3809
compiler=$CC
3240
3810
_LT_AC_TAGVAR(compiler, $1)=$CC
3241
3811
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3242
3812
 
3259
3829
# with your package, and you will get complaints that there are
3260
3830
# no rules to generate ltmain.sh.
3261
3831
if test -f "$ltmain"; then
 
3832
  # See if we are running on zsh, and set the options which allow our commands through
 
3833
  # without removal of \ escapes.
 
3834
  if test -n "${ZSH_VERSION+set}" ; then
 
3835
    setopt NO_GLOB_SUBST
 
3836
  fi  
3262
3837
  # Now quote all the things that may contain metacharacters while being
3263
3838
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3264
3839
  # variables and quote the copies for generation of the libtool script.
3265
 
  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
 
3840
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
3266
3841
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3267
3842
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3268
3843
    deplibs_check_method reload_flag reload_cmds need_locks \
3280
3855
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3281
3856
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3282
3857
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
3858
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
3283
3859
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
3284
3860
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3285
3861
    _LT_AC_TAGVAR(predep_objects, $1) \
3296
3872
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
3297
3873
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
3298
3874
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
3875
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
3299
3876
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
3877
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
3878
    _LT_AC_TAGVAR(module_cmds, $1) \
 
3879
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
3300
3880
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3301
3881
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
3302
3882
    _LT_AC_TAGVAR(include_expsyms, $1); do
3306
3886
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3307
3887
    _LT_AC_TAGVAR(archive_cmds, $1) | \
3308
3888
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
3889
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
3890
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
3309
3891
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3310
3892
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3311
3893
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
3367
3949
# configuration script generated by Autoconf, you may include it under
3368
3950
# the same distribution terms that you use for the rest of that program.
3369
3951
 
 
3952
# A sed program that does not truncate output.
 
3953
SED=$lt_SED
 
3954
 
3370
3955
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3371
 
Xsed="sed -e s/^X//"
 
3956
Xsed="$SED -e s/^X//"
3372
3957
 
3373
3958
# The HP-UX ksh and POSIX shell print the target directory to stdout
3374
3959
# if CDPATH is set.
3394
3979
# Whether or not to add -lc for building shared libraries.
3395
3980
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
3396
3981
 
 
3982
# Whether or not to disallow shared libs when runtime libs are static
 
3983
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
3984
 
3397
3985
# Whether or not to optimize for fast installation.
3398
3986
fast_install=$enable_fast_install
3399
3987
 
3417
4005
# Is the compiler the GNU C compiler?
3418
4006
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3419
4007
 
 
4008
# An ERE matcher.
 
4009
EGREP=$lt_EGREP
 
4010
 
3420
4011
# The linker used to build libraries.
3421
4012
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3422
4013
 
3426
4017
# A BSD-compatible nm program.
3427
4018
NM=$lt_NM
3428
4019
 
3429
 
# A sed program that does not truncate output.
3430
 
SED=$lt_SED
3431
 
 
3432
4020
# A symbol stripping program
3433
4021
STRIP=$STRIP
3434
4022
 
3460
4048
# Old archive suffix (normally "a").
3461
4049
libext="$libext"
3462
4050
 
 
4051
# Shared library suffix (normally ".so").
 
4052
shrext='$shrext'
 
4053
 
3463
4054
# Executable file suffix (normally "").
3464
4055
exeext="$exeext"
3465
4056
 
3537
4128
postinstall_cmds=$lt_postinstall_cmds
3538
4129
postuninstall_cmds=$lt_postuninstall_cmds
3539
4130
 
 
4131
# Commands used to build a loadable module (assumed same as above if empty)
 
4132
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
4133
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
4134
 
3540
4135
# Commands to strip libraries.
3541
4136
old_striplib=$lt_old_striplib
3542
4137
striplib=$lt_striplib
3607
4202
# This must work even if \$libdir does not exist.
3608
4203
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3609
4204
 
 
4205
# If ld is used when linking, flag to hardcode \$libdir into
 
4206
# a binary during linking. This must work even if \$libdir does
 
4207
# not exist.
 
4208
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
4209
 
3610
4210
# Whether we need a single -rpath flag with a separated argument.
3611
4211
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3612
4212
 
3613
 
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
4213
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
3614
4214
# resulting binary.
3615
4215
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3616
4216
 
3622
4222
# the resulting binary.
3623
4223
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3624
4224
 
 
4225
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
4226
# and all subsequent libraries and executables linked against it.
 
4227
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
4228
 
3625
4229
# Variables whose values should be saved in libtool wrapper scripts and
3626
4230
# restored at relink time.
3627
4231
variables_saved_for_relink="$variables_saved_for_relink"
3673
4277
fi
3674
4278
EOF
3675
4279
    ;;
3676
 
 
3677
 
  cygwin* | mingw* | pw32* | os2*)
3678
 
    cat <<'EOF' >> "$cfgfile"
3679
 
    # This is a source program that is used to create dlls on Windows
3680
 
    # Don't remove nor modify the starting and closing comments
3681
 
    _LT_AC_FILE_LTDLL_C
3682
 
    # This is a source program that is used to create import libraries
3683
 
    # on Windows for dlls which lack them. Don't remove nor modify the
3684
 
    # starting and closing comments
3685
 
    _LT_AC_FILE_IMPGEN_C
3686
 
EOF
3687
 
    ;;
3688
4280
  esac
3689
4281
 
3690
4282
  # We use sed instead of cat because bash on DJGPP gets confused if
3718
4310
 
3719
4311
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3720
4312
    lt_cv_prog_compiler_rtti_exceptions,
3721
 
    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
 
4313
    [-fno-rtti -fno-exceptions], [],
3722
4314
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3723
4315
fi
3724
4316
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3770
4362
irix* | nonstopux*)
3771
4363
  symcode='[[BCDEGRST]]'
3772
4364
  ;;
 
4365
osf*)
 
4366
  symcode='[[BCDEGQRST]]'
 
4367
  ;;
3773
4368
solaris* | sysv5*)
3774
4369
  symcode='[[BDT]]'
3775
4370
  ;;
3780
4375
 
3781
4376
# Handle CRLF in mingw tool chain
3782
4377
opt_cr=
3783
 
case $host_os in
 
4378
case $build_os in
3784
4379
mingw*)
3785
4380
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3786
4381
  ;;
3787
4382
esac
3788
4383
 
3789
4384
# If we're using GNU nm, then use its standard symbol codes.
3790
 
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3791
 
  symcode='[[ABCDGISTW]]'
3792
 
fi
 
4385
case `$NM -V 2>&1` in
 
4386
*GNU* | *'with BFD'*)
 
4387
  symcode='[[ABCDGISTW]]' ;;
 
4388
esac
3793
4389
 
3794
4390
# Try without a prefix undercore, then with it.
3795
4391
for ac_symprfx in "" "_"; do
3825
4421
      fi
3826
4422
 
3827
4423
      # Make sure that we snagged all the symbols we need.
3828
 
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3829
 
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
 
4424
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
4425
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
3830
4426
          cat <<EOF > conftest.$ac_ext
3831
4427
#ifdef __cplusplus
3832
4428
extern "C" {
3852
4448
lt_preloaded_symbols[[]] =
3853
4449
{
3854
4450
EOF
3855
 
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
4451
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
3856
4452
          cat <<\EOF >> conftest.$ac_ext
3857
4453
  {0, (lt_ptr_t) 0}
3858
4454
};
3934
4530
      # like `-m68040'.
3935
4531
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3936
4532
      ;;
3937
 
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4533
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3938
4534
      # PIC is the default for these OSes.
3939
4535
      ;;
3940
 
    cygwin* | mingw* | os2*)
 
4536
    mingw* | os2* | pw32*)
3941
4537
      # This hack is so that the source file can tell whether it is being
3942
4538
      # built for inclusion in a dll (and should export symbols for example).
3943
4539
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3957
4553
      fi
3958
4554
      ;;
3959
4555
    hpux*)
3960
 
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
3961
 
      if test "$host_cpu" != ia64; then
 
4556
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4557
      # not for PA HP-UX.
 
4558
      case "$host_cpu" in
 
4559
      hppa*64*|ia64*)
 
4560
        ;;
 
4561
      *)
3962
4562
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3963
 
      fi
 
4563
        ;;
 
4564
      esac
3964
4565
      ;;
3965
4566
    *)
3966
4567
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4013
4614
          aCC)
4014
4615
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015
4616
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4016
 
            if test "$host_cpu" != ia64; then
 
4617
            case "$host_cpu" in
 
4618
            hppa*64*|ia64*)
 
4619
              # +Z the default
 
4620
              ;;
 
4621
            *)
4017
4622
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4018
 
            fi
 
4623
              ;;
 
4624
            esac
4019
4625
            ;;
4020
4626
          *)
4021
4627
            ;;
4039
4645
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4040
4646
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4041
4647
            ;;
 
4648
          icpc)
 
4649
            # Intel C++
 
4650
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4651
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4652
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4653
            ;; 
4042
4654
          cxx)
4043
4655
            # Compaq C++
4044
4656
            # Make sure the PIC flag is empty.  It appears that all Alpha
4169
4781
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4170
4782
      ;;
4171
4783
 
4172
 
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4784
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4173
4785
      # PIC is the default for these OSes.
4174
4786
      ;;
4175
4787
 
4176
 
    cygwin* | mingw* | pw32* | os2*)
 
4788
    mingw* | pw32* | os2*)
4177
4789
      # This hack is so that the source file can tell whether it is being
4178
4790
      # built for inclusion in a dll (and should export symbols for example).
4179
4791
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4199
4811
      ;;
4200
4812
 
4201
4813
    hpux*)
4202
 
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4203
 
      if test "$host_cpu" != ia64; then
 
4814
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4815
      # not for PA HP-UX.
 
4816
      case "$host_cpu" in
 
4817
      hppa*64*|ia64*)
 
4818
        # +Z the default
 
4819
        ;;
 
4820
      *)
4204
4821
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4205
 
      fi
 
4822
        ;;
 
4823
      esac
4206
4824
      ;;
4207
4825
 
4208
4826
    *)
4222
4840
      fi
4223
4841
      ;;
4224
4842
 
4225
 
    cygwin* | mingw* | pw32* | os2*)
 
4843
    mingw* | pw32* | os2*)
4226
4844
      # This hack is so that the source file can tell whether it is being
4227
4845
      # built for inclusion in a dll (and should export symbols for example).
4228
4846
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4230
4848
 
4231
4849
    hpux9* | hpux10* | hpux11*)
4232
4850
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4233
 
      if test "$host_cpu" != ia64; then
 
4851
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4852
      # not for PA HP-UX.
 
4853
      case "$host_cpu" in
 
4854
      hppa*64*|ia64*)
 
4855
        # +Z the default
 
4856
        ;;
 
4857
      *)
4234
4858
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4235
 
      fi
 
4859
        ;;
 
4860
      esac
4236
4861
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4237
4862
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4238
4863
      ;;
4248
4873
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4249
4874
      ;;
4250
4875
 
 
4876
    linux*)
 
4877
      case $CC in
 
4878
      icc* | ecc*)
 
4879
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4880
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4881
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4882
        ;;
 
4883
      ccc*)
 
4884
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4885
        # All Alpha code is PIC.
 
4886
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4887
        ;;
 
4888
      esac
 
4889
      ;;
 
4890
 
4251
4891
    osf3* | osf4* | osf5*)
4252
4892
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4253
4893
      # All OSF/1 code is PIC.
4272
4912
      ;;
4273
4913
 
4274
4914
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4275
 
      if test "x$host_vendor" = xsni; then
4276
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4277
 
      else
4278
 
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4279
 
      fi
 
4915
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4280
4916
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4281
4917
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4282
4918
      ;;
4307
4943
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4308
4944
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4309
4945
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4310
 
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
 
4946
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
4311
4947
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4312
4948
     "" | " "*) ;;
4313
4949
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4321
4957
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4322
4958
    ;;
4323
4959
  *)
4324
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
 
4960
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
4325
4961
    ;;
4326
4962
esac
4327
4963
])
4333
4969
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4334
4970
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4335
4971
ifelse([$1],[CXX],[
4336
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
4972
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4337
4973
  case $host_os in
4338
4974
  aix4* | aix5*)
4339
4975
    # If we're using GNU nm, then we don't want the "-C" option.
4340
4976
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4341
 
    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
 
4977
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4342
4978
      _LT_AC_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'
4343
4979
    else
4344
4980
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
4345
4981
    fi
4346
4982
    ;;
4347
 
  cygwin* | mingw* | pw32*)
 
4983
  pw32*)
4348
4984
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4349
4985
  ;;
 
4986
  cygwin* | mingw*)
 
4987
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
4988
  ;;
4350
4989
  *)
4351
 
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
4990
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4352
4991
  ;;
4353
4992
  esac
4354
4993
],[
4355
4994
  runpath_var=
4356
4995
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4357
 
 
 
4996
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4358
4997
  _LT_AC_TAGVAR(archive_cmds, $1)=
4359
 
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4360
4998
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4361
4999
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4362
5000
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4364
5002
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4365
5003
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4366
5004
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5005
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4367
5006
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4368
5007
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
4369
5008
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4370
5009
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4371
5010
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5011
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5012
  _LT_AC_TAGVAR(module_cmds, $1)=
 
5013
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
4372
5014
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
4373
 
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5015
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4374
5016
  # include_expsyms should be a list of space-separated symbols to be *always*
4375
5017
  # included in the symbol list
4376
5018
  _LT_AC_TAGVAR(include_expsyms, $1)=
4377
 
  # exclude_expsyms can be an egrep regular expression of symbols to exclude
 
5019
  # exclude_expsyms can be an extended regexp of symbols to exclude
4378
5020
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4379
5021
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4380
5022
  # as well as any symbol that contains `d'.
4438
5080
      ;;
4439
5081
 
4440
5082
    beos*)
4441
 
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
5083
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4442
5084
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4443
5085
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4444
5086
        # support --undefined.  This deserves some investigation.  FIXME
4445
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5087
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
4446
5088
      else
4447
5089
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4448
5090
      fi
4449
5091
      ;;
4450
5092
 
4451
5093
    cygwin* | mingw* | pw32*)
4452
 
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4453
 
      # no search path for DLLs.
 
5094
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5095
      # as there is no search path for DLLs.
4454
5096
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4455
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4456
 
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4457
 
 
4458
 
      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4459
 
        sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4460
 
        test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4461
 
        if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4462
 
        else $CC -o impgen impgen.c ; fi)~
4463
 
        $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4464
 
 
4465
 
      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4466
 
 
4467
 
      # cygwin and mingw dlls have different entry points and sets of symbols
4468
 
      # to exclude.
4469
 
      # FIXME: what about values for MSVC?
4470
 
      dll_entry=__cygwin_dll_entry@12
4471
 
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4472
 
      case $host_os in
4473
 
      mingw*)
4474
 
        # mingw values
4475
 
        dll_entry=_DllMainCRTStartup@12
4476
 
        dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
4477
 
        ;;
4478
 
      esac
4479
 
 
4480
 
      # mingw and cygwin differ, and it's simplest to just exclude the union
4481
 
      # of the two symbol sets.
4482
 
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4483
 
 
4484
 
      # recent cygwin and mingw systems supply a stub DllMain which the user
4485
 
      # can override, but on older systems we have to supply one (in ltdll.c)
4486
 
      if test "x$lt_cv_need_dllmain" = "xyes"; then
4487
 
        ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4488
 
        ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
4489
 
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4490
 
      else
4491
 
        ltdll_obj=
4492
 
        ltdll_cmds=
4493
 
      fi
4494
 
 
4495
 
      # Extract the symbol export list from an `--export-all' def file,
4496
 
      # then regenerate the def file from the symbol export list, so that
4497
 
      # the compiled dll only exports the symbol export list.
4498
 
      # Be careful not to strip the DATA tag left by newer dlltools.
4499
 
      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
4500
 
        $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4501
 
        sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
4502
 
 
4503
 
      # If the export-symbols file already is a .def file (1st line
4504
 
      # is EXPORTS), use it as is.
4505
 
      # If DATA tags from a recent dlltool are present, honour them!
4506
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
4507
 
          cp $export_symbols $output_objdir/$soname-def;
 
5097
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
 
5098
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5099
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5100
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
5101
 
 
5102
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
5103
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
5104
        # If the export-symbols file already is a .def file (1st line
 
5105
        # is EXPORTS), use it as is; otherwise, prepend...
 
5106
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5107
          cp $export_symbols $output_objdir/$soname.def;
4508
5108
        else
4509
 
          echo EXPORTS > $output_objdir/$soname-def;
4510
 
          _lt_hint=1;
4511
 
          cat $export_symbols | while read symbol; do
4512
 
           set dummy \$symbol;
4513
 
           case \[$]# in
4514
 
             2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4515
 
             *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
4516
 
           esac;
4517
 
           _lt_hint=`expr 1 + \$_lt_hint`;
4518
 
          done;
 
5109
          echo EXPORTS > $output_objdir/$soname.def;
 
5110
          cat $export_symbols >> $output_objdir/$soname.def;
4519
5111
        fi~
4520
 
        '"$ltdll_cmds"'
4521
 
        $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4522
 
        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
4523
 
        $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4524
 
        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
4525
 
        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
 
5112
        $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
5113
      else
 
5114
        ld_shlibs=no
 
5115
      fi
4526
5116
      ;;
4527
5117
 
4528
5118
    netbsd*)
4530
5120
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4531
5121
        wlarc=
4532
5122
      else
4533
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4534
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5123
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
 
5124
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4535
5125
      fi
4536
5126
      ;;
4537
5127
 
4538
5128
    solaris* | sysv5*)
4539
 
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
 
5129
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
4540
5130
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4541
5131
        cat <<EOF 1>&2
4542
5132
 
4548
5138
*** used, and then restart.
4549
5139
 
4550
5140
EOF
4551
 
      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4552
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4553
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5141
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5142
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
 
5143
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4554
5144
      else
4555
5145
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4556
5146
      fi
4564
5154
      ;;
4565
5155
 
4566
5156
    *)
4567
 
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4568
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4569
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5157
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5158
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
 
5159
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4570
5160
      else
4571
5161
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4572
5162
      fi
4577
5167
      runpath_var=LD_RUN_PATH
4578
5168
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4579
5169
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4580
 
      case $host_os in
4581
 
      cygwin* | mingw* | pw32*)
4582
 
        # dlltool doesn't understand --whole-archive et. al.
4583
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4584
 
        ;;
4585
 
      *)
4586
 
        # ancient GNU ld didn't support --whole-archive et. al.
4587
 
        if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
4588
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4589
 
        else
 
5170
      # ancient GNU ld didn't support --whole-archive et. al.
 
5171
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
5172
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5173
      else
4590
5174
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4591
 
        fi
4592
 
        ;;
4593
 
      esac
 
5175
      fi
4594
5176
    fi
4595
5177
  else
4596
5178
    # PORTME fill in a description of your system's linker (not GNU ld)
4619
5201
      else
4620
5202
        # If we're using GNU nm, then we don't want the "-C" option.
4621
5203
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
4622
 
        if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
 
5204
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4623
5205
          _LT_AC_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'
4624
5206
        else
4625
5207
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
4688
5270
       # Determine the default libpath from the value encoded in an empty executable.
4689
5271
        _LT_AC_SYS_LIBPATH_AIX
4690
5272
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4691
 
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
4692
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
5273
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
5274
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4693
5275
       else
4694
5276
        if test "$host_cpu" = ia64; then
4695
5277
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4696
5278
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4697
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
5279
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4698
5280
        else
4699
5281
         # Determine the default libpath from the value encoded in an empty executable.
4700
5282
         _LT_AC_SYS_LIBPATH_AIX
4709
5291
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4710
5292
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4711
5293
          # This is similar to how AIX traditionally builds it's shared libraries.
4712
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
5294
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4713
5295
        fi
4714
5296
      fi
4715
5297
      ;;
4732
5314
      # hardcode_libdir_flag_spec is actually meaningless, as there is
4733
5315
      # no search path for DLLs.
4734
5316
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4735
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5317
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
4736
5318
      # Tell ltmain to make .lib files, not .a files.
4737
5319
      libext=lib
 
5320
      # Tell ltmain to make .dll files, not .so files.
 
5321
      shrext=".dll"
4738
5322
      # FIXME: Setting linknames here is a bad hack.
4739
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
5323
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
4740
5324
      # The linker will automatically build a .lib file if we build a DLL.
4741
5325
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4742
5326
      # FIXME: Should let the user specify the lib program.
4743
5327
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4744
5328
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
5329
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4745
5330
      ;;
4746
5331
 
4747
5332
    darwin* | rhapsody*)
 
5333
    if test "$GXX" = yes ; then
 
5334
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4748
5335
      case "$host_os" in
4749
5336
      rhapsody* | darwin1.[[012]])
4750
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
5337
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
4751
5338
        ;;
4752
5339
      *) # Darwin 1.3 on
4753
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
5340
        if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
5341
          allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
5342
        else
 
5343
          case ${MACOSX_DEPLOYMENT_TARGET} in
 
5344
            10.[012])
 
5345
              allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
5346
              ;;
 
5347
            10.*)
 
5348
              allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
 
5349
              ;;
 
5350
          esac
 
5351
        fi
4754
5352
        ;;
4755
5353
      esac
4756
 
 
4757
 
      # FIXME: Relying on posixy $() will cause problems for
4758
 
      #        cross-compilation, but unfortunately the echo tests do not
4759
 
      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
4760
 
      #        `"' quotes if we put them in here... so don't!
4761
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
4762
 
      # We need to add '_' to the symbols in $export_symbols first
4763
 
      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
4764
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4765
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5354
        lt_int_apple_cc_single_mod=no
 
5355
        output_verbose_link_cmd='echo'
 
5356
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
5357
          lt_int_apple_cc_single_mod=yes
 
5358
        fi
 
5359
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
5360
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
 
5361
        else
 
5362
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
 
5363
      fi
 
5364
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
 
5365
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5366
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
5367
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5368
        else
 
5369
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5370
        fi
 
5371
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5372
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5373
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
5374
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4766
5375
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
5376
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5377
    else  
 
5378
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5379
    fi  
4767
5380
      ;;
4768
5381
 
4769
5382
    dgux*)
4797
5410
 
4798
5411
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4799
5412
    freebsd*)
4800
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
5413
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
4801
5414
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4802
5415
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4803
5416
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4804
5417
      ;;
4805
5418
 
4806
 
    hpux9* | hpux10* | hpux11*)
 
5419
    hpux9*)
4807
5420
      if test "$GCC" = yes; then
4808
 
        case $host_os in
4809
 
          hpux9*)
4810
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4811
 
            ;;
4812
 
          *)
4813
 
            if test "$host_cpu" = ia64; then
4814
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4815
 
            else
4816
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4817
 
            fi
4818
 
            ;;
4819
 
        esac
4820
 
      else
4821
 
        case $host_os in
4822
 
          hpux9*)
4823
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4824
 
            ;;
4825
 
          *)
4826
 
            if test "$host_cpu" = ia64; then
4827
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4828
 
            else
4829
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4830
 
            fi
4831
 
            ;;
4832
 
        esac
4833
 
      fi
4834
 
      if test "$host_cpu" = ia64; then
4835
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4836
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
4837
 
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4838
 
      else
4839
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4840
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4841
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4842
 
      fi
 
5421
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5422
      else
 
5423
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5424
      fi
 
5425
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5426
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5427
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5428
 
4843
5429
      # hardcode_minus_L: Not really in the search PATH,
4844
5430
      # but as the default location of the library.
4845
5431
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4846
5432
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4847
5433
      ;;
4848
5434
 
 
5435
    hpux10* | hpux11*)
 
5436
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
5437
        case "$host_cpu" in
 
5438
        hppa*64*|ia64*)
 
5439
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
 
5440
          ;;
 
5441
        *)
 
5442
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
 
5443
          ;;
 
5444
        esac
 
5445
      else
 
5446
        case "$host_cpu" in
 
5447
        hppa*64*|ia64*)
 
5448
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5449
          ;;
 
5450
        *)
 
5451
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5452
          ;;
 
5453
        esac
 
5454
      fi
 
5455
      if test "$with_gnu_ld" = no; then
 
5456
        case "$host_cpu" in
 
5457
        hppa*64*)
 
5458
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5459
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
5460
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5461
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5462
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5463
          ;;
 
5464
        ia64*)
 
5465
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5466
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5467
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5468
 
 
5469
          # hardcode_minus_L: Not really in the search PATH,
 
5470
          # but as the default location of the library.
 
5471
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5472
          ;;
 
5473
        *)
 
5474
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5475
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5476
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5477
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5478
 
 
5479
          # hardcode_minus_L: Not really in the search PATH,
 
5480
          # but as the default location of the library.
 
5481
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5482
          ;;
 
5483
        esac
 
5484
      fi
 
5485
      ;;
 
5486
 
4849
5487
    irix5* | irix6* | nonstopux*)
4850
5488
      if test "$GCC" = yes; then
4851
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5489
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4852
5490
      else
4853
5491
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
5492
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4854
5493
      fi
4855
5494
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4856
5495
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4879
5518
    openbsd*)
4880
5519
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4881
5520
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4882
 
 
4883
5521
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4884
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
5522
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
4885
5523
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4886
5524
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4887
5525
      else
4891
5529
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4892
5530
           ;;
4893
5531
         *)
4894
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
5532
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
4895
5533
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4896
5534
           ;;
4897
5535
       esac
4902
5540
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4903
5541
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4904
5542
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4905
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
5543
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
4906
5544
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4907
5545
      ;;
4908
5546
 
4909
5547
    osf3*)
4910
5548
      if test "$GCC" = yes; then
4911
5549
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4912
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5550
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4913
5551
      else
4914
5552
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4915
5553
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4921
5559
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
4922
5560
      if test "$GCC" = yes; then
4923
5561
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4924
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5562
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4925
5563
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4926
5564
      else
4927
5565
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4928
5566
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4929
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
5567
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4930
5568
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
4931
5569
 
4932
5570
        # Both c and cxx compiler support -rpath directly
4946
5584
    solaris*)
4947
5585
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4948
5586
      if test "$GCC" = yes; then
4949
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4950
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4951
 
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
5587
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
 
5588
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5589
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
4952
5590
      else
4953
5591
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4954
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5592
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4955
5593
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4956
5594
      fi
4957
5595
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4968
5606
      if test "x$host_vendor" = xsequent; then
4969
5607
        # Use $CC to link under sequent, because it throws in some extra .o
4970
5608
        # files that make .init and .fini sections work.
4971
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
5609
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
4972
5610
      else
4973
5611
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4974
5612
      fi
4979
5617
      ;;
4980
5618
 
4981
5619
    sysv4)
4982
 
      if test "x$host_vendor" = xsni; then
4983
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
4984
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4985
 
      else
4986
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4987
 
        _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4988
 
      fi
 
5620
      case $host_vendor in
 
5621
        sni)
 
5622
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5623
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
5624
        ;;
 
5625
        siemens)
 
5626
          ## LD is ld it makes a PLAMLIB
 
5627
          ## CC just makes a GrossModule.
 
5628
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
5629
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
5630
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5631
        ;;
 
5632
        motorola)
 
5633
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5634
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
5635
        ;;
 
5636
      esac
4989
5637
      runpath_var='LD_RUN_PATH'
4990
5638
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4991
5639
      ;;
5018
5666
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
5019
5667
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5020
5668
      if test "$GCC" = yes; then
5021
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5669
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
5022
5670
      else
5023
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5671
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
5024
5672
      fi
5025
5673
      runpath_var='LD_RUN_PATH'
5026
5674
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5031
5679
      # $CC -shared without GNU ld will not create a library from C++
5032
5680
      # object files and a static libstdc++, better avoid it by now
5033
5681
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5034
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5682
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5035
5683
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5036
5684
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5037
5685
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5061
5709
#
5062
5710
# Do we need to explicitly link libc?
5063
5711
#
5064
 
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5065
 
if test "$enable_shared" = yes && test "$GCC" = yes; then
5066
 
  case $_LT_AC_TAGVAR(archive_cmds, $1) in
5067
 
  *'~'*)
5068
 
    # FIXME: we may have to deal with multi-command sequences.
5069
 
    ;;
5070
 
  '$CC '*)
5071
 
    # Test whether the compiler implicitly links with -lc since on some
5072
 
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
5073
 
    # to ld, don't add -lc before -lgcc.
5074
 
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5075
 
    $rm conftest*
5076
 
    echo 'static int dummy;' > conftest.$ac_ext
 
5712
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
5713
x|xyes)
 
5714
  # Assume -lc should be added
 
5715
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5077
5716
 
5078
 
    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5079
 
      soname=conftest
5080
 
      lib=conftest
5081
 
      libobjs=conftest.$ac_objext
5082
 
      deplibs=
5083
 
      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5084
 
      compiler_flags=-v
5085
 
      linker_flags=-v
5086
 
      verstring=
5087
 
      output_objdir=.
5088
 
      libname=conftest
5089
 
      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5090
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5091
 
      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5092
 
      then
5093
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5717
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
5718
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
5719
    *'~'*)
 
5720
      # FIXME: we may have to deal with multi-command sequences.
 
5721
      ;;
 
5722
    '$CC '*)
 
5723
      # Test whether the compiler implicitly links with -lc since on some
 
5724
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
5725
      # to ld, don't add -lc before -lgcc.
 
5726
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
5727
      $rm conftest*
 
5728
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
5729
  
 
5730
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
5731
        soname=conftest
 
5732
        lib=conftest
 
5733
        libobjs=conftest.$ac_objext
 
5734
        deplibs=
 
5735
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
5736
        compiler_flags=-v
 
5737
        linker_flags=-v
 
5738
        verstring=
 
5739
        output_objdir=.
 
5740
        libname=conftest
 
5741
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
5742
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5743
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
5744
        then
 
5745
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5746
        else
 
5747
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5748
        fi
 
5749
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5094
5750
      else
5095
 
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5751
        cat conftest.err 1>&5
5096
5752
      fi
5097
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5098
 
    else
5099
 
      cat conftest.err 1>&5
5100
 
    fi
5101
 
    $rm conftest*
5102
 
    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5103
 
    ;;
5104
 
  esac
5105
 
fi
 
5753
      $rm conftest*
 
5754
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
5755
      ;;
 
5756
    esac
 
5757
  fi
 
5758
  ;;
 
5759
esac
5106
5760
])# AC_LIBTOOL_PROG_LD_SHLIBS
5107
5761
 
5108
5762
 
5146
5800
])# _LT_AC_FILE_LTDLL_C
5147
5801
 
5148
5802
 
5149
 
# _LT_AC_FILE_IMPGEN_C
5150
 
# --------------------
5151
 
# Be careful that the start marker always follows a newline.
5152
 
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
5153
 
# /* impgen.c starts here */
5154
 
# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5155
 
#
5156
 
#  This file is part of GNU libtool.
5157
 
#
5158
 
#  This program is free software; you can redistribute it and/or modify
5159
 
#  it under the terms of the GNU General Public License as published by
5160
 
#  the Free Software Foundation; either version 2 of the License, or
5161
 
#  (at your option) any later version.
5162
 
#
5163
 
#  This program is distributed in the hope that it will be useful,
5164
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
5165
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5166
 
#  GNU General Public License for more details.
5167
 
#
5168
 
#  You should have received a copy of the GNU General Public License
5169
 
#  along with this program; if not, write to the Free Software
5170
 
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5171
 
#  */
5172
 
#
5173
 
# #include <stdio.h>            /* for printf() */
5174
 
# #include <unistd.h>           /* for open(), lseek(), read() */
5175
 
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
5176
 
# #include <string.h>           /* for strdup() */
5177
 
#
5178
 
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
5179
 
# #ifndef O_BINARY
5180
 
# #define O_BINARY 0
5181
 
# #endif
5182
 
#
5183
 
# static unsigned int
5184
 
# pe_get16 (fd, offset)
5185
 
#      int fd;
5186
 
#      int offset;
5187
 
# {
5188
 
#   unsigned char b[2];
5189
 
#   lseek (fd, offset, SEEK_SET);
5190
 
#   read (fd, b, 2);
5191
 
#   return b[0] + (b[1]<<8);
5192
 
# }
5193
 
#
5194
 
# static unsigned int
5195
 
# pe_get32 (fd, offset)
5196
 
#     int fd;
5197
 
#     int offset;
5198
 
# {
5199
 
#   unsigned char b[4];
5200
 
#   lseek (fd, offset, SEEK_SET);
5201
 
#   read (fd, b, 4);
5202
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5203
 
# }
5204
 
#
5205
 
# static unsigned int
5206
 
# pe_as32 (ptr)
5207
 
#      void *ptr;
5208
 
# {
5209
 
#   unsigned char *b = ptr;
5210
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5211
 
# }
5212
 
#
5213
 
# int
5214
 
# main (argc, argv)
5215
 
#     int argc;
5216
 
#     char *argv[];
5217
 
# {
5218
 
#     int dll;
5219
 
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5220
 
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
5221
 
#     unsigned long name_rvas, nexp;
5222
 
#     unsigned char *expdata, *erva;
5223
 
#     char *filename, *dll_name;
5224
 
#
5225
 
#     filename = argv[1];
5226
 
#
5227
 
#     dll = open(filename, O_RDONLY|O_BINARY);
5228
 
#     if (dll < 1)
5229
 
#       return 1;
5230
 
#
5231
 
#     dll_name = filename;
5232
 
#
5233
 
#     for (i=0; filename[i]; i++)
5234
 
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
5235
 
#           dll_name = filename + i +1;
5236
 
#
5237
 
#     pe_header_offset = pe_get32 (dll, 0x3c);
5238
 
#     opthdr_ofs = pe_header_offset + 4 + 20;
5239
 
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
5240
 
#
5241
 
#     if (num_entries < 1) /* no exports */
5242
 
#       return 1;
5243
 
#
5244
 
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
5245
 
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
5246
 
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5247
 
#     secptr = (pe_header_offset + 4 + 20 +
5248
 
#             pe_get16 (dll, pe_header_offset + 4 + 16));
5249
 
#
5250
 
#     expptr = 0;
5251
 
#     for (i = 0; i < nsections; i++)
5252
 
#     {
5253
 
#       char sname[8];
5254
 
#       unsigned long secptr1 = secptr + 40 * i;
5255
 
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5256
 
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5257
 
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5258
 
#       lseek(dll, secptr1, SEEK_SET);
5259
 
#       read(dll, sname, 8);
5260
 
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
5261
 
#       {
5262
 
#           expptr = fptr + (export_rva - vaddr);
5263
 
#           if (export_rva + export_size > vaddr + vsize)
5264
 
#               export_size = vsize - (export_rva - vaddr);
5265
 
#           break;
5266
 
#       }
5267
 
#     }
5268
 
#
5269
 
#     expdata = (unsigned char*)malloc(export_size);
5270
 
#     lseek (dll, expptr, SEEK_SET);
5271
 
#     read (dll, expdata, export_size);
5272
 
#     erva = expdata - export_rva;
5273
 
#
5274
 
#     nexp = pe_as32 (expdata+24);
5275
 
#     name_rvas = pe_as32 (expdata+32);
5276
 
#
5277
 
#     printf ("EXPORTS\n");
5278
 
#     for (i = 0; i<nexp; i++)
5279
 
#     {
5280
 
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5281
 
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5282
 
#     }
5283
 
#
5284
 
#     return 0;
5285
 
# }
5286
 
# /* impgen.c ends here */
5287
 
])# _LT_AC_FILE_IMPGEN_C
5288
 
 
5289
5803
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5290
5804
# ---------------------------------
5291
5805
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5333
5847
do
5334
5848
  IFS=$as_save_IFS
5335
5849
  test -z "$as_dir" && as_dir=.
5336
 
  for ac_prog in sed gsed; do
 
5850
  for lt_ac_prog in sed gsed; do
5337
5851
    for ac_exec_ext in '' $ac_executable_extensions; do
5338
 
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
5339
 
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 
5852
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
5853
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5340
5854
      fi
5341
5855
    done
5342
5856
  done
5343
5857
done
5344
 
 
5345
 
  # Create a temporary directory, and hook for its removal unless debugging.
5346
 
$debug ||
5347
 
{
5348
 
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5349
 
  trap '{ (exit 1); exit 1; }' 1 2 13 15
5350
 
}
5351
 
 
5352
 
# Create a (secure) tmp directory for tmp files.
5353
 
: ${TMPDIR=/tmp}
5354
 
{
5355
 
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
5356
 
  test -n "$tmp" && test -d "$tmp"
5357
 
}  ||
5358
 
{
5359
 
  tmp=$TMPDIR/sed$$-$RANDOM
5360
 
  (umask 077 && mkdir $tmp)
5361
 
} ||
5362
 
{
5363
 
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5364
 
   { (exit 1); exit 1; }
5365
 
}
5366
 
  _max=0
5367
 
  _count=0
5368
 
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5369
 
  # along with /bin/sed that truncates output.
5370
 
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
5371
 
    test ! -f ${_sed} && break
5372
 
    cat /dev/null > "$tmp/sed.in"
5373
 
    _count=0
5374
 
    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
5375
 
    # Check for GNU sed and select it if it is found.
5376
 
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
5377
 
      lt_cv_path_SED=${_sed}
5378
 
      break;
 
5858
lt_ac_max=0
 
5859
lt_ac_count=0
 
5860
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
5861
# along with /bin/sed that truncates output.
 
5862
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
5863
  test ! -f $lt_ac_sed && break
 
5864
  cat /dev/null > conftest.in
 
5865
  lt_ac_count=0
 
5866
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
5867
  # Check for GNU sed and select it if it is found.
 
5868
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
5869
    lt_cv_path_SED=$lt_ac_sed
 
5870
    break
 
5871
  fi
 
5872
  while true; do
 
5873
    cat conftest.in conftest.in >conftest.tmp
 
5874
    mv conftest.tmp conftest.in
 
5875
    cp conftest.in conftest.nl
 
5876
    echo >>conftest.nl
 
5877
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
5878
    cmp -s conftest.out conftest.nl || break
 
5879
    # 10000 chars as input seems more than enough
 
5880
    test $lt_ac_count -gt 10 && break
 
5881
    lt_ac_count=`expr $lt_ac_count + 1`
 
5882
    if test $lt_ac_count -gt $lt_ac_max; then
 
5883
      lt_ac_max=$lt_ac_count
 
5884
      lt_cv_path_SED=$lt_ac_sed
5379
5885
    fi
5380
 
    while true; do
5381
 
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
5382
 
      mv "$tmp/sed.tmp" "$tmp/sed.in"
5383
 
      cp "$tmp/sed.in" "$tmp/sed.nl"
5384
 
      echo >>"$tmp/sed.nl"
5385
 
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
5386
 
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
5387
 
      # 10000 chars as input seems more than enough
5388
 
      test $_count -gt 10 && break
5389
 
      _count=`expr $_count + 1`
5390
 
      if test $_count -gt $_max; then
5391
 
        _max=$_count
5392
 
        lt_cv_path_SED=$_sed
5393
 
      fi
5394
 
    done
5395
5886
  done
5396
 
  rm -rf "$tmp"
 
5887
done
5397
5888
])
 
5889
SED=$lt_cv_path_SED
5398
5890
AC_MSG_RESULT([$SED])
5399
5891
])