~ubuntu-branches/ubuntu/edgy/libsoup/edgy-updates

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-03-11 15:53:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060311155309-4ei0gqzv59bqlk04
Tags: 2.2.91-1ubuntu1
* Sync with Debian
* debian/patches/02_xmlrpc_pointer.patch,
  debian/patches/03_xmlrpc_array.patch:
  - patches for the xmlrpc code

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15
15
 
16
 
# serial 47 AC_PROG_LIBTOOL
 
16
# serial 48 AC_PROG_LIBTOOL
17
17
 
18
18
 
19
19
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
143
143
default_ofile=libtool
144
144
can_build_shared=yes
145
145
 
146
 
# All known linkers require a `.a' archive for static linking (except M$VC,
 
146
# All known linkers require a `.a' archive for static linking (except MSVC,
147
147
# which needs '.lib').
148
148
libext=a
149
149
ltmain="$ac_aux_dir/ltmain.sh"
163
163
test -z "$AS" && AS=as
164
164
test -z "$CC" && CC=cc
165
165
test -z "$LTCC" && LTCC=$CC
 
166
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
166
167
test -z "$DLLTOOL" && DLLTOOL=dlltool
167
168
test -z "$LD" && LD=ld
168
169
test -z "$LN_S" && LN_S="ln -s"
182
183
if test -n "$RANLIB"; then
183
184
  case $host_os in
184
185
  openbsd*)
185
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
186
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
186
187
    ;;
187
188
  *)
188
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
189
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
189
190
    ;;
190
191
  esac
191
192
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
233
234
# If no C compiler was specified, use CC.
234
235
LTCC=${LTCC-"$CC"}
235
236
 
 
237
# If no C compiler flags were specified, use CFLAGS.
 
238
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
239
 
236
240
# Allow CC to be a program name with arguments.
237
241
compiler=$CC
238
242
])# _LT_AC_SYS_COMPILER
261
265
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
262
266
[ac_outfile=conftest.$ac_objext
263
267
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
264
 
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
268
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
265
269
_lt_compiler_boilerplate=`cat conftest.err`
266
270
$rm conftest*
267
271
])# _LT_COMPILER_BOILERPLATE
274
278
AC_DEFUN([_LT_LINKER_BOILERPLATE],
275
279
[ac_outfile=conftest.$ac_objext
276
280
printf "$lt_simple_link_test_code" >conftest.$ac_ext
277
 
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
281
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
278
282
_lt_linker_boilerplate=`cat conftest.err`
279
283
$rm conftest*
280
284
])# _LT_LINKER_BOILERPLATE
359
363
# find a string as large as possible, as long as the shell can cope with it
360
364
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
361
365
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
362
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
363
 
       echo_test_string="`eval $cmd`" &&
 
366
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
367
       echo_test_string=`eval $cmd` &&
364
368
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
365
369
    then
366
370
      break
529
533
  # Find out which ABI we are using.
530
534
  echo 'int i;' > conftest.$ac_ext
531
535
  if AC_TRY_EVAL(ac_compile); then
532
 
    case "`/usr/bin/file conftest.o`" in
 
536
    case `/usr/bin/file conftest.o` in
533
537
    *32-bit*)
534
538
      case $host in
535
539
        x86_64-*linux*)
580
584
    CFLAGS="$SAVE_CFLAGS"
581
585
  fi
582
586
  ;;
 
587
sparc*-*solaris*)
 
588
  # Find out which ABI we are using.
 
589
  echo 'int i;' > conftest.$ac_ext
 
590
  if AC_TRY_EVAL(ac_compile); then
 
591
    case `/usr/bin/file conftest.o` in
 
592
    *64-bit*)
 
593
      case $lt_cv_prog_gnu_ld in
 
594
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
595
      *)    LD="${LD-ld} -64" ;;
 
596
      esac
 
597
      ;;
 
598
    esac
 
599
  fi
 
600
  rm -rf conftest*
 
601
  ;;
 
602
 
583
603
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
584
604
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
585
605
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
611
631
   # with a dollar sign (not a hyphen), so the echo should work correctly.
612
632
   # The option is referenced via a variable to avoid confusing sed.
613
633
   lt_compile=`echo "$ac_compile" | $SED \
614
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
634
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
615
635
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
616
636
   -e 's:$: $lt_compiler_flag:'`
617
637
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
622
642
   if (exit $ac_status) && test -s "$ac_outfile"; then
623
643
     # The compiler can only warn and ignore the option if not recognized
624
644
     # So say no if there are warnings other than the usual output.
625
 
     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
626
 
     $SED '/^$/d' conftest.err >conftest.er2
627
 
     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
 
645
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
646
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
647
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
628
648
       $2=yes
629
649
     fi
630
650
   fi
650
670
   LDFLAGS="$LDFLAGS $3"
651
671
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
652
672
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
653
 
     # The compiler can only warn and ignore the option if not recognized
 
673
     # The linker can only warn and ignore the option if not recognized
654
674
     # So say no if there are warnings
655
675
     if test -s conftest.err; then
656
676
       # Append any errors to the config.log.
657
677
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
658
 
       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
659
 
       $SED '/^$/d' conftest.err >conftest.er2
 
678
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
679
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
660
680
       if diff conftest.exp conftest.er2 >/dev/null; then
661
681
         $2=yes
662
682
       fi
725
745
    elif test -x /usr/sbin/sysctl; then
726
746
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
727
747
    else
728
 
      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
 
748
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
729
749
    fi
730
750
    # And add a safety zone
731
751
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
732
752
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
733
753
    ;;
 
754
 
 
755
  interix*)
 
756
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
757
    lt_cv_sys_max_cmd_len=196608
 
758
    ;;
 
759
 
734
760
  osf*)
735
761
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
736
762
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
737
763
    # nice to cause kernel panics so lets avoid the loop below.
738
764
    # First set a reasonable default.
739
765
    lt_cv_sys_max_cmd_len=16384
740
 
    # 
 
766
    #
741
767
    if test -x /sbin/sysconfig; then
742
768
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
743
769
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
744
770
      esac
745
771
    fi
746
772
    ;;
 
773
  sco3.2v5*)
 
774
    lt_cv_sys_max_cmd_len=102400
 
775
    ;;
 
776
  sysv5* | sco5v6* | sysv4.2uw2*)
 
777
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
778
    if test -n "$kargmax"; then
 
779
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
 
780
    else
 
781
      lt_cv_sys_max_cmd_len=32768
 
782
    fi
 
783
    ;;
747
784
  *)
748
785
    # If test is not a shell built-in, we'll probably end up computing a
749
786
    # maximum length that is only half of the actual maximum length, but
775
812
 
776
813
 
777
814
# _LT_AC_CHECK_DLFCN
778
 
# --------------------
 
815
# ------------------
779
816
AC_DEFUN([_LT_AC_CHECK_DLFCN],
780
817
[AC_CHECK_HEADERS(dlfcn.h)dnl
781
818
])# _LT_AC_CHECK_DLFCN
783
820
 
784
821
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
785
822
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
786
 
# ------------------------------------------------------------------
 
823
# ---------------------------------------------------------------------
787
824
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
788
825
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
789
826
if test "$cross_compiling" = yes; then :
849
886
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
850
887
      /* dlclose (self); */
851
888
    }
 
889
  else
 
890
    puts (dlerror ());
852
891
 
853
892
    exit (status);
854
893
}]
855
894
EOF
856
895
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
857
 
    (./conftest; exit; ) 2>/dev/null
 
896
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
858
897
    lt_status=$?
859
898
    case x$lt_status in
860
899
      x$lt_dlno_uscore) $1 ;;
861
900
      x$lt_dlneed_uscore) $2 ;;
862
 
      x$lt_unknown|x*) $3 ;;
 
901
      x$lt_dlunknown|x*) $3 ;;
863
902
    esac
864
903
  else :
865
904
    # compilation failed
871
910
 
872
911
 
873
912
# AC_LIBTOOL_DLOPEN_SELF
874
 
# -------------------
 
913
# ----------------------
875
914
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
876
915
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
877
916
if test "x$enable_dlopen" != xyes; then
942
981
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
943
982
 
944
983
    save_LDFLAGS="$LDFLAGS"
945
 
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
984
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
946
985
 
947
986
    save_LIBS="$LIBS"
948
987
    LIBS="$lt_cv_dlopen_libs $LIBS"
955
994
    ])
956
995
 
957
996
    if test "x$lt_cv_dlopen_self" = xyes; then
958
 
      LDFLAGS="$LDFLAGS $link_static_flag"
 
997
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
959
998
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
960
999
          lt_cv_dlopen_self_static, [dnl
961
1000
          _LT_AC_TRY_DLOPEN_SELF(
1003
1042
   # Note that $ac_compile itself does not contain backslashes and begins
1004
1043
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1005
1044
   lt_compile=`echo "$ac_compile" | $SED \
1006
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1045
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1007
1046
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1008
1047
   -e 's:$: $lt_compiler_flag:'`
1009
1048
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1015
1054
   then
1016
1055
     # The compiler can only warn and ignore the option if not recognized
1017
1056
     # So say no if there are warnings
1018
 
     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1019
 
     $SED '/^$/d' out/conftest.err >out/conftest.er2
1020
 
     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
1057
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
1058
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
1059
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1021
1060
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1022
1061
     fi
1023
1062
   fi
1024
 
   chmod u+w .
 
1063
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1025
1064
   $rm conftest*
1026
1065
   # SGI C++ compiler will create directory out/ii_files/ for
1027
1066
   # template instantiation
1281
1320
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1282
1321
      dldir=$destdir/`dirname \$dlpath`~
1283
1322
      test -d \$dldir || mkdir -p \$dldir~
1284
 
      $install_prog $dir/$dlname \$dldir/$dlname'
 
1323
      $install_prog $dir/$dlname \$dldir/$dlname~
 
1324
      chmod a+x \$dldir/$dlname'
1285
1325
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1286
1326
      dlpath=$dir/\$dldll~
1287
1327
       $rm \$dlpath'
1334
1374
  soname_spec='${libname}${release}${major}$shared_ext'
1335
1375
  shlibpath_overrides_runpath=yes
1336
1376
  shlibpath_var=DYLD_LIBRARY_PATH
1337
 
  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
 
1377
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1338
1378
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1339
1379
  if test "$GCC" = yes; then
1340
1380
    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"`
1372
1412
freebsd* | dragonfly*)
1373
1413
  # DragonFly does not have aout.  When/if they implement a new
1374
1414
  # versioning mechanism, adjust this.
1375
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
1415
  if test -x /usr/bin/objformat; then
 
1416
    objformat=`/usr/bin/objformat`
 
1417
  else
 
1418
    case $host_os in
 
1419
    freebsd[[123]]*) objformat=aout ;;
 
1420
    *) objformat=elf ;;
 
1421
    esac
 
1422
  fi
1376
1423
  version_type=freebsd-$objformat
1377
1424
  case $version_type in
1378
1425
    freebsd-elf*)
1394
1441
    shlibpath_overrides_runpath=yes
1395
1442
    hardcode_into_libs=yes
1396
1443
    ;;
1397
 
  *) # from 3.2 on
 
1444
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
1445
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1398
1446
    shlibpath_overrides_runpath=no
1399
1447
    hardcode_into_libs=yes
1400
1448
    ;;
 
1449
  freebsd*) # from 4.6 on
 
1450
    shlibpath_overrides_runpath=yes
 
1451
    hardcode_into_libs=yes
 
1452
    ;;
1401
1453
  esac
1402
1454
  ;;
1403
1455
 
1417
1469
  version_type=sunos
1418
1470
  need_lib_prefix=no
1419
1471
  need_version=no
1420
 
  case "$host_cpu" in
 
1472
  case $host_cpu in
1421
1473
  ia64*)
1422
1474
    shrext_cmds='.so'
1423
1475
    hardcode_into_libs=yes
1457
1509
  postinstall_cmds='chmod 555 $lib'
1458
1510
  ;;
1459
1511
 
 
1512
interix3*)
 
1513
  version_type=linux
 
1514
  need_lib_prefix=no
 
1515
  need_version=no
 
1516
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1517
  soname_spec='${libname}${release}${shared_ext}$major'
 
1518
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
1519
  shlibpath_var=LD_LIBRARY_PATH
 
1520
  shlibpath_overrides_runpath=no
 
1521
  hardcode_into_libs=yes
 
1522
  ;;
 
1523
 
1460
1524
irix5* | irix6* | nonstopux*)
1461
1525
  case $host_os in
1462
1526
    nonstopux*) version_type=nonstopux ;;
1578
1642
 
1579
1643
openbsd*)
1580
1644
  version_type=sunos
 
1645
  sys_lib_dlsearch_path_spec="/usr/lib"
1581
1646
  need_lib_prefix=no
1582
1647
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1583
1648
  case $host_os in
1621
1686
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1622
1687
  ;;
1623
1688
 
1624
 
sco3.2v5*)
1625
 
  version_type=osf
1626
 
  soname_spec='${libname}${release}${shared_ext}$major'
1627
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1628
 
  shlibpath_var=LD_LIBRARY_PATH
1629
 
  ;;
1630
 
 
1631
1689
solaris*)
1632
1690
  version_type=linux
1633
1691
  need_lib_prefix=no
1653
1711
  need_version=yes
1654
1712
  ;;
1655
1713
 
1656
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
1714
sysv4 | sysv4.3*)
1657
1715
  version_type=linux
1658
1716
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1659
1717
  soname_spec='${libname}${release}${shared_ext}$major'
1686
1744
  fi
1687
1745
  ;;
1688
1746
 
 
1747
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
1748
  version_type=freebsd-elf
 
1749
  need_lib_prefix=no
 
1750
  need_version=no
 
1751
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1752
  soname_spec='${libname}${release}${shared_ext}$major'
 
1753
  shlibpath_var=LD_LIBRARY_PATH
 
1754
  hardcode_into_libs=yes
 
1755
  if test "$with_gnu_ld" = yes; then
 
1756
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
1757
    shlibpath_overrides_runpath=no
 
1758
  else
 
1759
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
1760
    shlibpath_overrides_runpath=yes
 
1761
    case $host_os in
 
1762
      sco3.2v5*)
 
1763
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
1764
        ;;
 
1765
    esac
 
1766
  fi
 
1767
  sys_lib_dlsearch_path_spec='/usr/lib'
 
1768
  ;;
 
1769
 
1689
1770
uts4*)
1690
1771
  version_type=linux
1691
1772
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1699
1780
esac
1700
1781
AC_MSG_RESULT([$dynamic_linker])
1701
1782
test "$dynamic_linker" = no && can_build_shared=no
 
1783
 
 
1784
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
1785
if test "$GCC" = yes; then
 
1786
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
1787
fi
1702
1788
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1703
1789
 
1704
1790
 
1723
1809
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1724
1810
    fi
1725
1811
  fi
 
1812
  if test -z "$LTCFLAGS"; then
 
1813
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
 
1814
  fi
1726
1815
 
1727
1816
  # Extract list of available tagged configurations in $ofile.
1728
1817
  # Note that this assumes the entire list is on one line.
1813
1902
 
1814
1903
# AC_LIBTOOL_WIN32_DLL
1815
1904
# --------------------
1816
 
# declare package support for building win32 dll's
 
1905
# declare package support for building win32 DLLs
1817
1906
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1818
1907
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1819
1908
])# AC_LIBTOOL_WIN32_DLL
1851
1940
 
1852
1941
# AC_DISABLE_SHARED
1853
1942
# -----------------
1854
 
#- set the default shared flag to --disable-shared
 
1943
# set the default shared flag to --disable-shared
1855
1944
AC_DEFUN([AC_DISABLE_SHARED],
1856
1945
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1857
1946
AC_ENABLE_SHARED(no)
1987
2076
      if test -n "$file_magic_test_file"; then
1988
2077
        case $deplibs_check_method in
1989
2078
        "file_magic "*)
1990
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
2079
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1991
2080
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1992
2081
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1993
2082
            $EGREP "$file_magic_regex" > /dev/null; then
2097
2186
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2098
2187
      lt_cv_path_LD="$ac_dir/$ac_prog"
2099
2188
      # Check to see if the program is GNU ld.  I'd rather use --version,
2100
 
      # but apparently some GNU ld's only accept -v.
 
2189
      # but apparently some variants of GNU ld only accept -v.
2101
2190
      # Break only if it was the GNU/non-GNU ld that we prefer.
2102
2191
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2103
2192
      *GNU* | *'with BFD'*)
2129
2218
AC_DEFUN([AC_PROG_LD_GNU],
2130
2219
[AC_REQUIRE([AC_PROG_EGREP])dnl
2131
2220
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2132
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
2221
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2133
2222
case `$LD -v 2>&1 </dev/null` in
2134
2223
*GNU* | *'with BFD'*)
2135
2224
  lt_cv_prog_gnu_ld=yes
2159
2248
case $host_os in
2160
2249
  darwin*)
2161
2250
    if test "$GCC" = yes; then
2162
 
      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
 
2251
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2163
2252
    else
2164
2253
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2165
2254
    fi
2243
2332
 
2244
2333
hpux10.20* | hpux11*)
2245
2334
  lt_cv_file_magic_cmd=/usr/bin/file
2246
 
  case "$host_cpu" in
 
2335
  case $host_cpu in
2247
2336
  ia64*)
2248
2337
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2249
2338
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2259
2348
  esac
2260
2349
  ;;
2261
2350
 
 
2351
interix3*)
 
2352
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
2353
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
2354
  ;;
 
2355
 
2262
2356
irix5* | irix6* | nonstopux*)
2263
2357
  case $LD in
2264
2358
  *-32|*"-32 ") libmagic=32-bit;;
2304
2398
  lt_cv_deplibs_check_method=pass_all
2305
2399
  ;;
2306
2400
 
2307
 
sco3.2v5*)
2308
 
  lt_cv_deplibs_check_method=pass_all
2309
 
  ;;
2310
 
 
2311
2401
solaris*)
2312
2402
  lt_cv_deplibs_check_method=pass_all
2313
2403
  ;;
2314
2404
 
2315
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2405
sysv4 | sysv4.3*)
2316
2406
  case $host_vendor in
2317
2407
  motorola)
2318
2408
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
2333
2423
  siemens)
2334
2424
    lt_cv_deplibs_check_method=pass_all
2335
2425
    ;;
 
2426
  pc)
 
2427
    lt_cv_deplibs_check_method=pass_all
 
2428
    ;;
2336
2429
  esac
2337
2430
  ;;
2338
2431
 
2339
 
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
2432
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2340
2433
  lt_cv_deplibs_check_method=pass_all
2341
2434
  ;;
2342
2435
esac
2356
2449
  # Let the user override the test.
2357
2450
  lt_cv_path_NM="$NM"
2358
2451
else
2359
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2360
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2361
 
    IFS="$lt_save_ifs"
2362
 
    test -z "$ac_dir" && ac_dir=.
2363
 
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2364
 
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2365
 
      # Check to see if the nm accepts a BSD-compat flag.
2366
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2367
 
      #   nm: unknown option "B" ignored
2368
 
      # Tru64's nm complains that /dev/null is an invalid object file
2369
 
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2370
 
      */dev/null* | *'Invalid file or object type'*)
2371
 
        lt_cv_path_NM="$tmp_nm -B"
2372
 
        break
2373
 
        ;;
2374
 
      *)
2375
 
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2376
 
        */dev/null*)
2377
 
          lt_cv_path_NM="$tmp_nm -p"
 
2452
  lt_nm_to_check="${ac_tool_prefix}nm"
 
2453
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
 
2454
    lt_nm_to_check="$lt_nm_to_check nm"
 
2455
  fi
 
2456
  for lt_tmp_nm in $lt_nm_to_check; do
 
2457
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2458
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
2459
      IFS="$lt_save_ifs"
 
2460
      test -z "$ac_dir" && ac_dir=.
 
2461
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
2462
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
2463
        # Check to see if the nm accepts a BSD-compat flag.
 
2464
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
2465
        #   nm: unknown option "B" ignored
 
2466
        # Tru64's nm complains that /dev/null is an invalid object file
 
2467
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
2468
        */dev/null* | *'Invalid file or object type'*)
 
2469
          lt_cv_path_NM="$tmp_nm -B"
2378
2470
          break
2379
2471
          ;;
2380
2472
        *)
2381
 
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2382
 
          continue # so that we can try to find one that supports BSD flags
 
2473
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
2474
          */dev/null*)
 
2475
            lt_cv_path_NM="$tmp_nm -p"
 
2476
            break
 
2477
            ;;
 
2478
          *)
 
2479
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
2480
            continue # so that we can try to find one that supports BSD flags
 
2481
            ;;
 
2482
          esac
2383
2483
          ;;
2384
2484
        esac
2385
 
      esac
2386
 
    fi
 
2485
      fi
 
2486
    done
 
2487
    IFS="$lt_save_ifs"
2387
2488
  done
2388
 
  IFS="$lt_save_ifs"
2389
2489
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2390
2490
fi])
2391
2491
NM="$lt_cv_path_NM"
2417
2517
# -----------------------------------
2418
2518
# sets LIBLTDL to the link flags for the libltdl convenience library and
2419
2519
# LTDLINCL to the include flags for the libltdl header and adds
2420
 
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2421
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2422
 
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2423
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2424
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
2425
 
# flat and you're not using automake, define top_builddir and
2426
 
# top_srcdir appropriately in the Makefiles.
 
2520
# --enable-ltdl-convenience to the configure arguments.  Note that
 
2521
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2522
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
2523
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
2524
# (note the single quotes!).  If your package is not flat and you're not
 
2525
# using automake, define top_builddir and top_srcdir appropriately in
 
2526
# the Makefiles.
2427
2527
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2428
2528
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2429
2529
  case $enable_ltdl_convenience in
2442
2542
# -----------------------------------
2443
2543
# sets LIBLTDL to the link flags for the libltdl installable library and
2444
2544
# LTDLINCL to the include flags for the libltdl header and adds
2445
 
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2446
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2447
 
# DIRECTORY is not provided and an installed libltdl is not found, it is
2448
 
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2449
 
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2450
 
# quotes!).  If your package is not flat and you're not using automake,
2451
 
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
2545
# --enable-ltdl-install to the configure arguments.  Note that
 
2546
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2547
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
2548
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
2549
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
2550
# flat and you're not using automake, define top_builddir and top_srcdir
 
2551
# appropriately in the Makefiles.
2452
2552
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2453
2553
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2454
2554
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2491
2591
])# _LT_AC_LANG_CXX
2492
2592
 
2493
2593
# _LT_AC_PROG_CXXCPP
2494
 
# ---------------
 
2594
# ------------------
2495
2595
AC_DEFUN([_LT_AC_PROG_CXXCPP],
2496
2596
[
2497
2597
AC_REQUIRE([AC_PROG_CXX])
2540
2640
 
2541
2641
 
2542
2642
# AC_LIBTOOL_RC
2543
 
# --------------
 
2643
# -------------
2544
2644
# enable support for Windows resource files
2545
2645
AC_DEFUN([AC_LIBTOOL_RC],
2546
2646
[AC_REQUIRE([LT_AC_PROG_RC])
2577
2677
_LT_COMPILER_BOILERPLATE
2578
2678
_LT_LINKER_BOILERPLATE
2579
2679
 
2580
 
#
2581
 
# Check for any special shared library compilation flags.
2582
 
#
2583
 
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2584
 
if test "$GCC" = no; then
2585
 
  case $host_os in
2586
 
  sco3.2v5*)
2587
 
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2588
 
    ;;
2589
 
  esac
2590
 
fi
2591
 
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2592
 
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2593
 
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
2594
 
  else
2595
 
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2596
 
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2597
 
  fi
2598
 
fi
2599
 
 
2600
 
 
2601
 
#
2602
 
# Check to make sure the static flag actually works.
2603
 
#
2604
 
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2605
 
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2606
 
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2607
 
  [],
2608
 
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2609
 
 
2610
 
 
2611
2680
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2612
2681
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2613
2682
AC_LIBTOOL_PROG_CC_C_O($1)
2616
2685
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2617
2686
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2618
2687
AC_LIBTOOL_SYS_LIB_STRIP
2619
 
AC_LIBTOOL_DLOPEN_SELF($1)
 
2688
AC_LIBTOOL_DLOPEN_SELF
2620
2689
 
2621
 
# Report which librarie types wil actually be built
 
2690
# Report which library types will actually be built
2622
2691
AC_MSG_CHECKING([if libtool supports shared libraries])
2623
2692
AC_MSG_RESULT([$can_build_shared])
2624
2693
 
2627
2696
 
2628
2697
# On AIX, shared libraries and static libraries use the same namespace, and
2629
2698
# are all built from PIC.
2630
 
case "$host_os" in
 
2699
case $host_os in
2631
2700
aix3*)
2632
2701
  test "$enable_shared" = yes && enable_static=no
2633
2702
  if test -n "$RANLIB"; then
2677
2746
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2678
2747
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2679
2748
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
2749
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2680
2750
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2681
2751
_LT_AC_TAGVAR(module_cmds, $1)=
2682
2752
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2694
2764
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2695
2765
 
2696
2766
# Source file extension for C++ test sources.
2697
 
ac_ext=cc
 
2767
ac_ext=cpp
2698
2768
 
2699
2769
# Object file extension for compiled C++ test sources.
2700
2770
objext=o
2704
2774
lt_simple_compile_test_code="int some_variable = 0;\n"
2705
2775
 
2706
2776
# Code to be used in simple link tests
2707
 
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
2777
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2708
2778
 
2709
2779
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2710
2780
_LT_AC_SYS_COMPILER
2723
2793
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2724
2794
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2725
2795
else
2726
 
  unset lt_cv_prog_gnu_ld
 
2796
  $as_unset lt_cv_prog_gnu_ld
2727
2797
fi
2728
2798
if test -n "${lt_cv_path_LDCXX+set}"; then
2729
2799
  lt_cv_path_LD=$lt_cv_path_LDCXX
2730
2800
else
2731
 
  unset lt_cv_path_LD
 
2801
  $as_unset lt_cv_path_LD
2732
2802
fi
2733
2803
test -z "${LDCXX+set}" || LD=$LDCXX
2734
2804
CC=${CXX-"c++"}
2823
2893
            ;;
2824
2894
          esac
2825
2895
        done
 
2896
        ;;
2826
2897
      esac
2827
2898
 
2828
2899
      exp_sym_flag='-bexport'
2860
2931
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2861
2932
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2862
2933
        fi
 
2934
        ;;
2863
2935
      esac
2864
2936
      shared_flag='-shared'
2865
2937
      if test "$aix_use_runtimelinking" = yes; then
2891
2963
      _LT_AC_SYS_LIBPATH_AIX
2892
2964
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2893
2965
 
2894
 
      _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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
2966
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2895
2967
     else
2896
2968
      if test "$host_cpu" = ia64; then
2897
2969
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2898
2970
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2899
 
        _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"
 
2971
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
2900
2972
      else
2901
2973
        # Determine the default libpath from the value encoded in an empty executable.
2902
2974
        _LT_AC_SYS_LIBPATH_AIX
2905
2977
        # -berok will link without error, but may produce a broken library.
2906
2978
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2907
2979
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2908
 
        # -bexpall does not export symbols beginning with underscore (_)
2909
 
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2910
2980
        # Exported symbols can be pulled into shared objects from archives
2911
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
2981
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2912
2982
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2913
 
        # This is similar to how AIX traditionally builds it's shared libraries.
2914
 
        _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'
 
2983
        # This is similar to how AIX traditionally builds its shared libraries.
 
2984
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2915
2985
      fi
2916
2986
    fi
2917
2987
    ;;
 
2988
 
 
2989
  beos*)
 
2990
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
2991
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
2992
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
2993
      # support --undefined.  This deserves some investigation.  FIXME
 
2994
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
2995
    else
 
2996
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2997
    fi
 
2998
    ;;
 
2999
 
2918
3000
  chorus*)
2919
3001
    case $cc_basename in
2920
3002
      *)
2924
3006
    esac
2925
3007
    ;;
2926
3008
 
2927
 
 
2928
3009
  cygwin* | mingw* | pw32*)
2929
3010
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2930
3011
    # as there is no search path for DLLs.
2934
3015
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2935
3016
 
2936
3017
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2937
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3018
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
2938
3019
      # If the export-symbols file already is a .def file (1st line
2939
3020
      # is EXPORTS), use it as is; otherwise, prepend...
2940
3021
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2943
3024
        echo EXPORTS > $output_objdir/$soname.def;
2944
3025
        cat $export_symbols >> $output_objdir/$soname.def;
2945
3026
      fi~
2946
 
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3027
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
2947
3028
    else
2948
3029
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2949
3030
    fi
2950
3031
  ;;
2951
3032
      darwin* | rhapsody*)
2952
 
        case "$host_os" in
 
3033
        case $host_os in
2953
3034
        rhapsody* | darwin1.[[012]])
2954
3035
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
2955
3036
         ;;
2987
3068
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2988
3069
        fi
2989
3070
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2990
 
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3071
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
2991
3072
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2992
3073
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2993
3074
          else
3000
3081
         output_verbose_link_cmd='echo'
3001
3082
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3002
3083
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3003
 
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3084
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3004
3085
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3005
3086
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3006
3087
          ;;
3080
3161
    ;;
3081
3162
  hpux10*|hpux11*)
3082
3163
    if test $with_gnu_ld = no; then
3083
 
      case "$host_cpu" in
3084
 
      hppa*64*)
3085
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3164
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3165
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3166
 
 
3167
      case $host_cpu in
 
3168
      hppa*64*|ia64*)
3086
3169
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3087
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3088
 
        ;;
3089
 
      ia64*)
3090
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3091
3170
        ;;
3092
3171
      *)
3093
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3094
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3095
3172
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3096
3173
        ;;
3097
3174
      esac
3098
3175
    fi
3099
 
    case "$host_cpu" in
3100
 
    hppa*64*)
3101
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3102
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3103
 
      ;;
3104
 
    ia64*)
3105
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3106
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3107
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3108
 
                                              # but as the default
3109
 
                                              # location of the library.
 
3176
    case $host_cpu in
 
3177
    hppa*64*|ia64*)
 
3178
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3179
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3110
3180
      ;;
3111
3181
    *)
3112
3182
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3122
3192
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3123
3193
        ;;
3124
3194
      aCC*)
3125
 
        case "$host_cpu" in
3126
 
        hppa*64*|ia64*)
3127
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3195
        case $host_cpu in
 
3196
        hppa*64*)
 
3197
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3198
          ;;
 
3199
        ia64*)
 
3200
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3128
3201
          ;;
3129
3202
        *)
3130
3203
          _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'
3143
3216
      *)
3144
3217
        if test "$GXX" = yes; then
3145
3218
          if test $with_gnu_ld = no; then
3146
 
            case "$host_cpu" in
3147
 
            ia64*|hppa*64*)
3148
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3219
            case $host_cpu in
 
3220
            hppa*64*)
 
3221
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3222
              ;;
 
3223
            ia64*)
 
3224
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3149
3225
              ;;
3150
3226
            *)
3151
3227
              _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'
3159
3235
        ;;
3160
3236
    esac
3161
3237
    ;;
 
3238
  interix3*)
 
3239
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3240
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3241
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3242
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3243
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
3244
    # Instead, shared libraries are loaded at an image base (0x10000000 by
 
3245
    # default) and relocated if they conflict, which is a slow very memory
 
3246
    # consuming and fragmenting process.  To avoid this, we pick a random,
 
3247
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
3248
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
3249
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
3250
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
3251
    ;;
3162
3252
  irix5* | irix6*)
3163
3253
    case $cc_basename in
3164
3254
      CC*)
3244
3334
 
3245
3335
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3246
3336
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3247
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
3337
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3248
3338
        ;;
3249
3339
      cxx*)
3250
3340
        # Compaq C++
3441
3531
    # FIXME: insert proper C++ library support
3442
3532
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3443
3533
    ;;
3444
 
  sco*)
3445
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3446
 
    case $cc_basename in
3447
 
      CC*)
3448
 
        # FIXME: insert proper C++ library support
3449
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3450
 
        ;;
3451
 
      *)
3452
 
        # FIXME: insert proper C++ library support
3453
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3454
 
        ;;
3455
 
    esac
3456
 
    ;;
3457
3534
  sunos4*)
3458
3535
    case $cc_basename in
3459
3536
      CC*)
3476
3553
    case $cc_basename in
3477
3554
      CC*)
3478
3555
        # Sun C++ 4.2, 5.x and Centerline C++
 
3556
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3479
3557
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3480
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3558
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3481
3559
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3482
 
        $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'
 
3560
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3483
3561
 
3484
3562
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3485
3563
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3499
3577
        esac
3500
3578
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3501
3579
 
3502
 
        # Commands to make compiler produce verbose output that lists
3503
 
        # what "hidden" libraries, object files and flags are used when
3504
 
        # linking a shared library.
3505
 
        #
3506
 
        # There doesn't appear to be a way to prevent this compiler from
3507
 
        # explicitly linking system object files so we need to strip them
3508
 
        # from the output so that they don't get included in the library
3509
 
        # dependencies.
3510
 
        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'
 
3580
        output_verbose_link_cmd='echo'
3511
3581
 
3512
3582
        # Archives containing C++ object files must be created using
3513
3583
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3553
3623
        ;;
3554
3624
    esac
3555
3625
    ;;
3556
 
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3557
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3626
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
3627
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
3628
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3629
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3630
    runpath_var='LD_RUN_PATH'
 
3631
 
 
3632
    case $cc_basename in
 
3633
      CC*)
 
3634
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3635
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3636
        ;;
 
3637
      *)
 
3638
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3639
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3640
        ;;
 
3641
    esac
 
3642
    ;;
 
3643
  sysv5* | sco3.2v5* | sco5v6*)
 
3644
    # Note: We can NOT use -z defs as we might desire, because we do not
 
3645
    # link with -lc, and that would cause any symbols used from libc to
 
3646
    # always be unresolved, which means just about no library would
 
3647
    # ever link correctly.  If we're not using GNU ld we use -z text
 
3648
    # though, which does catch some bad symbols but isn't as heavy-handed
 
3649
    # as -z defs.
 
3650
    # For security reasons, it is highly recommended that you always
 
3651
    # use absolute paths for naming shared libraries, and exclude the
 
3652
    # DT_RUNPATH tag from executables and libraries.  But doing so
 
3653
    # requires that you compile everything twice, which is a pain.
 
3654
    # So that behaviour is only enabled if SCOABSPATH is set to a
 
3655
    # non-empty value in the environment.  Most likely only useful for
 
3656
    # creating official distributions of packages.
 
3657
    # This is a hack until libtool officially supports absolute path
 
3658
    # names for shared libraries.
 
3659
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
3660
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
3661
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3662
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3663
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
3664
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
3665
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3666
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
3667
    runpath_var='LD_RUN_PATH'
 
3668
 
 
3669
    case $cc_basename in
 
3670
      CC*)
 
3671
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3672
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3673
        ;;
 
3674
      *)
 
3675
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3676
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3677
        ;;
 
3678
    esac
3558
3679
    ;;
3559
3680
  tandem*)
3560
3681
    case $cc_basename in
3591
3712
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3592
3713
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3593
3714
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3594
 
AC_LIBTOOL_SYS_LIB_STRIP
3595
 
AC_LIBTOOL_DLOPEN_SELF($1)
3596
3715
 
3597
3716
AC_LIBTOOL_CONFIG($1)
3598
3717
 
3610
3729
])# AC_LIBTOOL_LANG_CXX_CONFIG
3611
3730
 
3612
3731
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3613
 
# ------------------------
 
3732
# ------------------------------------
3614
3733
# Figure out "hidden" library dependencies from verbose
3615
3734
# compiler output when linking a shared library.
3616
3735
# Parse the compiler output and extract the necessary
3664
3783
  # The `*' in the case matches for architectures that use `case' in
3665
3784
  # $output_verbose_cmd can trigger glob expansion during the loop
3666
3785
  # eval without this substitution.
3667
 
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
3786
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3668
3787
 
3669
3788
  for p in `eval $output_verbose_link_cmd`; do
3670
3789
    case $p in
3740
3859
 
3741
3860
$rm -f confest.$objext
3742
3861
 
 
3862
# PORTME: override above test on systems where it is broken
 
3863
ifelse([$1],[CXX],
 
3864
[case $host_os in
 
3865
interix3*)
 
3866
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
3867
  # hack all around it, let's just trust "g++" to DTRT.
 
3868
  _LT_AC_TAGVAR(predep_objects,$1)=
 
3869
  _LT_AC_TAGVAR(postdep_objects,$1)=
 
3870
  _LT_AC_TAGVAR(postdeps,$1)=
 
3871
  ;;
 
3872
 
 
3873
solaris*)
 
3874
  case $cc_basename in
 
3875
  CC*)
 
3876
    # Adding this requires a known-good setup of shared libraries for
 
3877
    # Sun compiler versions before 5.6, else PIC objects from an old
 
3878
    # archive will be linked into the output, leading to subtle bugs.
 
3879
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
3880
    ;;
 
3881
  esac
 
3882
  ;;
 
3883
esac
 
3884
])
 
3885
 
3743
3886
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3744
3887
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3745
3888
esac
3746
3889
])# AC_LIBTOOL_POSTDEP_PREDEP
3747
3890
 
3748
3891
# AC_LIBTOOL_LANG_F77_CONFIG
3749
 
# ------------------------
 
3892
# --------------------------
3750
3893
# Ensure that the configuration vars for the C compiler are
3751
3894
# suitably defined.  Those variables are subsequently used by
3752
3895
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3809
3952
 
3810
3953
# On AIX, shared libraries and static libraries use the same namespace, and
3811
3954
# are all built from PIC.
3812
 
case "$host_os" in
 
3955
case $host_os in
3813
3956
aix3*)
3814
3957
  test "$enable_shared" = yes && enable_static=no
3815
3958
  if test -n "$RANLIB"; then
3830
3973
test "$enable_shared" = yes || enable_static=yes
3831
3974
AC_MSG_RESULT([$enable_static])
3832
3975
 
3833
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3834
 
 
3835
3976
_LT_AC_TAGVAR(GCC, $1)="$G77"
3836
3977
_LT_AC_TAGVAR(LD, $1)="$LD"
3837
3978
 
3841
3982
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3842
3983
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3843
3984
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3844
 
AC_LIBTOOL_SYS_LIB_STRIP
3845
 
 
3846
3985
 
3847
3986
AC_LIBTOOL_CONFIG($1)
3848
3987
 
3899
4038
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3900
4039
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3901
4040
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3902
 
AC_LIBTOOL_SYS_LIB_STRIP
3903
 
AC_LIBTOOL_DLOPEN_SELF($1)
3904
4041
 
3905
4042
AC_LIBTOOL_CONFIG($1)
3906
4043
 
3910
4047
 
3911
4048
 
3912
4049
# AC_LIBTOOL_LANG_RC_CONFIG
3913
 
# --------------------------
 
4050
# -------------------------
3914
4051
# Ensure that the configuration vars for the Windows resource compiler are
3915
4052
# suitably defined.  Those variables are subsequently used by
3916
4053
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3973
4110
  # Now quote all the things that may contain metacharacters while being
3974
4111
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3975
4112
  # variables and quote the copies for generation of the libtool script.
3976
 
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 
4113
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
3977
4114
    SED SHELL STRIP \
3978
4115
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3979
4116
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4142
4279
# A C compiler.
4143
4280
LTCC=$lt_LTCC
4144
4281
 
 
4282
# LTCC compiler flags.
 
4283
LTCFLAGS=$lt_LTCFLAGS
 
4284
 
4145
4285
# A language-specific compiler.
4146
4286
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4147
4287
 
4515
4655
osf*)
4516
4656
  symcode='[[BCDEGQRST]]'
4517
4657
  ;;
4518
 
solaris* | sysv5*)
 
4658
solaris*)
4519
4659
  symcode='[[BDRT]]'
4520
4660
  ;;
 
4661
sco3.2v5*)
 
4662
  symcode='[[DT]]'
 
4663
  ;;
 
4664
sysv4.2uw2*)
 
4665
  symcode='[[DT]]'
 
4666
  ;;
 
4667
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
4668
  symcode='[[ABDT]]'
 
4669
  ;;
4521
4670
sysv4)
4522
4671
  symcode='[[DFNSTU]]'
4523
4672
  ;;
4700
4849
      # DJGPP does not support shared libraries at all
4701
4850
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4702
4851
      ;;
 
4852
    interix3*)
 
4853
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
4854
      # Instead, we relocate shared libraries at runtime.
 
4855
      ;;
4703
4856
    sysv4*MP*)
4704
4857
      if test -d /usr/nec; then
4705
4858
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4708
4861
    hpux*)
4709
4862
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4710
4863
      # not for PA HP-UX.
4711
 
      case "$host_cpu" in
 
4864
      case $host_cpu in
4712
4865
      hppa*64*|ia64*)
4713
4866
        ;;
4714
4867
      *)
4769
4922
        case $cc_basename in
4770
4923
          CC*)
4771
4924
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4772
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
4925
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4773
4926
            if test "$host_cpu" != ia64; then
4774
4927
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4775
4928
            fi
4776
4929
            ;;
4777
4930
          aCC*)
4778
4931
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4779
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4780
 
            case "$host_cpu" in
 
4932
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
4933
            case $host_cpu in
4781
4934
            hppa*64*|ia64*)
4782
4935
              # +Z the default
4783
4936
              ;;
4790
4943
            ;;
4791
4944
        esac
4792
4945
        ;;
 
4946
      interix*)
 
4947
        # This is c89, which is MS Visual C++ (no shared libs)
 
4948
        # Anyone wants to do a port?
 
4949
        ;;
4793
4950
      irix5* | irix6* | nonstopux*)
4794
4951
        case $cc_basename in
4795
4952
          CC*)
4818
4975
            # Portland Group C++ compiler.
4819
4976
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4820
4977
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4821
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4978
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4822
4979
            ;;
4823
4980
          cxx*)
4824
4981
            # Compaq C++
4869
5026
        ;;
4870
5027
      psos*)
4871
5028
        ;;
4872
 
      sco*)
4873
 
        case $cc_basename in
4874
 
          CC*)
4875
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4876
 
            ;;
4877
 
          *)
4878
 
            ;;
4879
 
        esac
4880
 
        ;;
4881
5029
      solaris*)
4882
5030
        case $cc_basename in
4883
5031
          CC*)
4919
5067
            ;;
4920
5068
        esac
4921
5069
        ;;
4922
 
      unixware*)
 
5070
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5071
        case $cc_basename in
 
5072
          CC*)
 
5073
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5074
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5075
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5076
            ;;
 
5077
        esac
4923
5078
        ;;
4924
5079
      vxworks*)
4925
5080
        ;;
4966
5121
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4967
5122
      ;;
4968
5123
 
 
5124
    interix3*)
 
5125
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5126
      # Instead, we relocate shared libraries at runtime.
 
5127
      ;;
 
5128
 
4969
5129
    msdosdjgpp*)
4970
5130
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4971
5131
      # on systems that don't support them.
4982
5142
    hpux*)
4983
5143
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4984
5144
      # not for PA HP-UX.
4985
 
      case "$host_cpu" in
 
5145
      case $host_cpu in
4986
5146
      hppa*64*|ia64*)
4987
5147
        # +Z the default
4988
5148
        ;;
5029
5189
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5030
5190
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5031
5191
      # not for PA HP-UX.
5032
 
      case "$host_cpu" in
 
5192
      case $host_cpu in
5033
5193
      hppa*64*|ia64*)
5034
5194
        # +Z the default
5035
5195
        ;;
5059
5219
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5060
5220
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5061
5221
        ;;
5062
 
      pgcc* | pgf77* | pgf90*)
 
5222
      pgcc* | pgf77* | pgf90* | pgf95*)
5063
5223
        # Portland Group compilers (*not* the Pentium gcc compiler,
5064
5224
        # which looks to be a dead project)
5065
5225
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5066
5226
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5067
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5227
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5068
5228
        ;;
5069
5229
      ccc*)
5070
5230
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5080
5240
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5081
5241
      ;;
5082
5242
 
5083
 
    sco3.2v5*)
5084
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5085
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5086
 
      ;;
5087
 
 
5088
5243
    solaris*)
5089
5244
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5090
5245
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5102
5257
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5103
5258
      ;;
5104
5259
 
5105
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
5260
    sysv4 | sysv4.2uw2* | sysv4.3*)
5106
5261
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5107
5262
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5108
5263
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5115
5270
      fi
5116
5271
      ;;
5117
5272
 
 
5273
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5274
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5275
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5276
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5277
      ;;
 
5278
 
5118
5279
    unicos*)
5119
5280
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5120
5281
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5147
5308
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5148
5309
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5149
5310
fi
5150
 
case "$host_os" in
 
5311
case $host_os in
5151
5312
  # For platforms which do not support PIC, -DPIC is meaningless:
5152
5313
  *djgpp*)
5153
5314
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5156
5317
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5157
5318
    ;;
5158
5319
esac
 
5320
 
 
5321
#
 
5322
# Check to make sure the static flag actually works.
 
5323
#
 
5324
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
 
5325
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
5326
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
5327
  $lt_tmp_static_flag,
 
5328
  [],
 
5329
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5159
5330
])
5160
5331
 
5161
5332
 
5234
5405
      with_gnu_ld=no
5235
5406
    fi
5236
5407
    ;;
 
5408
  interix*)
 
5409
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
5410
    with_gnu_ld=yes
 
5411
    ;;
5237
5412
  openbsd*)
5238
5413
    with_gnu_ld=no
5239
5414
    ;;
5243
5418
  if test "$with_gnu_ld" = yes; then
5244
5419
    # If archive_cmds runs LD, not CC, wlarc should be empty
5245
5420
    wlarc='${wl}'
5246
 
    
 
5421
 
5247
5422
    # Set some defaults for GNU ld with shared library support. These
5248
5423
    # are reset later if shared libraries are not supported. Putting them
5249
5424
    # here allows them to be overridden if necessary.
5264
5439
      *\ 2.11.*) ;; # other 2.11 versions
5265
5440
      *) supports_anon_versioning=yes ;;
5266
5441
    esac
5267
 
    
 
5442
 
5268
5443
    # See if GNU ld supports shared libraries.
5269
5444
    case $host_os in
5270
5445
    aix3* | aix4* | aix5*)
5318
5493
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5319
5494
 
5320
5495
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5321
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
5496
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5322
5497
        # If the export-symbols file already is a .def file (1st line
5323
5498
        # is EXPORTS), use it as is; otherwise, prepend...
5324
5499
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5327
5502
          echo EXPORTS > $output_objdir/$soname.def;
5328
5503
          cat $export_symbols >> $output_objdir/$soname.def;
5329
5504
        fi~
5330
 
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
5505
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5331
5506
      else
5332
5507
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5333
5508
      fi
5334
5509
      ;;
5335
5510
 
 
5511
    interix3*)
 
5512
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5513
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5514
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5515
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5516
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
5517
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
5518
      # default) and relocated if they conflict, which is a slow very memory
 
5519
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
5520
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
5521
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
5522
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
5523
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
5524
      ;;
 
5525
 
5336
5526
    linux*)
5337
5527
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5338
5528
        tmp_addflag=
5339
5529
        case $cc_basename,$host_cpu in
5340
5530
        pgcc*)                          # Portland Group C compiler
5341
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5531
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5342
5532
          tmp_addflag=' $pic_flag'
5343
5533
          ;;
5344
 
        pgf77* | pgf90* )                       # Portland Group f77 and f90 compilers
5345
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5534
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
5535
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5346
5536
          tmp_addflag=' $pic_flag -Mnomain' ;;
5347
5537
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
5348
5538
          tmp_addflag=' -i_dynamic' ;;
5374
5564
      fi
5375
5565
      ;;
5376
5566
 
5377
 
    solaris* | sysv5*)
 
5567
    solaris*)
5378
5568
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5379
5569
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5380
5570
        cat <<EOF 1>&2
5395
5585
      fi
5396
5586
      ;;
5397
5587
 
 
5588
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
5589
      case `$LD -v 2>&1` in
 
5590
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
 
5591
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5592
        cat <<_LT_EOF 1>&2
 
5593
 
 
5594
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
5595
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
5596
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5597
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
5598
*** your PATH or compiler configuration so that the native linker is
 
5599
*** used, and then restart.
 
5600
 
 
5601
_LT_EOF
 
5602
        ;;
 
5603
        *)
 
5604
          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5605
            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
 
5606
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
 
5607
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
 
5608
          else
 
5609
            _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5610
          fi
 
5611
        ;;
 
5612
      esac
 
5613
      ;;
 
5614
 
5398
5615
    sunos4*)
5399
5616
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5400
5617
      wlarc=
5428
5645
      # Note: this linker hardcodes the directories in LIBPATH if there
5429
5646
      # are no directories specified by -L.
5430
5647
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5431
 
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
5648
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5432
5649
        # Neither direct hardcoding nor static linking is supported with a
5433
5650
        # broken collect2.
5434
5651
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5462
5679
            break
5463
5680
          fi
5464
5681
          done
 
5682
          ;;
5465
5683
        esac
5466
5684
 
5467
5685
        exp_sym_flag='-bexport'
5499
5717
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5500
5718
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5501
5719
          fi
 
5720
          ;;
5502
5721
        esac
5503
5722
        shared_flag='-shared'
5504
5723
        if test "$aix_use_runtimelinking" = yes; then
5511
5730
        # chokes on -Wl,-G. The following line is correct:
5512
5731
          shared_flag='-G'
5513
5732
        else
5514
 
        if test "$aix_use_runtimelinking" = yes; then
 
5733
          if test "$aix_use_runtimelinking" = yes; then
5515
5734
            shared_flag='${wl}-G'
5516
5735
          else
5517
5736
            shared_flag='${wl}-bM:SRE'
5518
 
        fi
 
5737
          fi
5519
5738
        fi
5520
5739
      fi
5521
5740
 
5529
5748
       # Determine the default libpath from the value encoded in an empty executable.
5530
5749
       _LT_AC_SYS_LIBPATH_AIX
5531
5750
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5532
 
        _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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
5751
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5533
5752
       else
5534
5753
        if test "$host_cpu" = ia64; then
5535
5754
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5536
5755
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5537
 
          _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"
 
5756
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5538
5757
        else
5539
5758
         # Determine the default libpath from the value encoded in an empty executable.
5540
5759
         _LT_AC_SYS_LIBPATH_AIX
5543
5762
          # -berok will link without error, but may produce a broken library.
5544
5763
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5545
5764
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5546
 
          # -bexpall does not export symbols beginning with underscore (_)
5547
 
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5548
5765
          # Exported symbols can be pulled into shared objects from archives
5549
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
5766
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5550
5767
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5551
 
          # This is similar to how AIX traditionally builds it's shared libraries.
5552
 
          _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'
 
5768
          # This is similar to how AIX traditionally builds its shared libraries.
 
5769
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5553
5770
        fi
5554
5771
      fi
5555
5772
      ;;
5588
5805
      ;;
5589
5806
 
5590
5807
    darwin* | rhapsody*)
5591
 
      case "$host_os" in
 
5808
      case $host_os in
5592
5809
        rhapsody* | darwin1.[[012]])
5593
5810
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5594
5811
         ;;
5617
5834
        output_verbose_link_cmd='echo'
5618
5835
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5619
5836
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5620
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5837
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5621
5838
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5622
5839
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5623
5840
    else
5626
5843
         output_verbose_link_cmd='echo'
5627
5844
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5628
5845
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5629
 
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5846
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5630
5847
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5631
5848
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5632
5849
          ;;
5690
5907
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5691
5908
      ;;
5692
5909
 
5693
 
    hpux10* | hpux11*)
5694
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5695
 
        case "$host_cpu" in
5696
 
        hppa*64*|ia64*)
 
5910
    hpux10*)
 
5911
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
5912
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5913
      else
 
5914
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5915
      fi
 
5916
      if test "$with_gnu_ld" = no; then
 
5917
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5918
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5919
 
 
5920
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5921
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5922
 
 
5923
        # hardcode_minus_L: Not really in the search PATH,
 
5924
        # but as the default location of the library.
 
5925
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5926
      fi
 
5927
      ;;
 
5928
 
 
5929
    hpux11*)
 
5930
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
5931
        case $host_cpu in
 
5932
        hppa*64*)
5697
5933
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5698
5934
          ;;
 
5935
        ia64*)
 
5936
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5937
          ;;
5699
5938
        *)
5700
5939
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5701
5940
          ;;
5702
5941
        esac
5703
5942
      else
5704
 
        case "$host_cpu" in
5705
 
        hppa*64*|ia64*)
5706
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5943
        case $host_cpu in
 
5944
        hppa*64*)
 
5945
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5946
          ;;
 
5947
        ia64*)
 
5948
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5707
5949
          ;;
5708
5950
        *)
5709
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5951
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5710
5952
          ;;
5711
5953
        esac
5712
5954
      fi
5713
5955
      if test "$with_gnu_ld" = no; then
5714
 
        case "$host_cpu" in
5715
 
        hppa*64*)
5716
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5956
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5957
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5958
 
 
5959
        case $host_cpu in
 
5960
        hppa*64*|ia64*)
5717
5961
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5718
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5719
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5720
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5721
 
          ;;
5722
 
        ia64*)
5723
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5724
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5725
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5726
 
 
5727
 
          # hardcode_minus_L: Not really in the search PATH,
5728
 
          # but as the default location of the library.
5729
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5962
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5963
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5730
5964
          ;;
5731
5965
        *)
5732
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5733
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5734
5966
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5735
5967
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5736
5968
 
5832
6064
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5833
6065
      ;;
5834
6066
 
5835
 
    sco3.2v5*)
5836
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5837
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5838
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5839
 
      runpath_var=LD_RUN_PATH
5840
 
      hardcode_runpath_var=yes
5841
 
      ;;
5842
 
 
5843
6067
    solaris*)
5844
6068
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5845
6069
      if test "$GCC" = yes; then
5925
6149
      fi
5926
6150
      ;;
5927
6151
 
5928
 
    sysv4.2uw2*)
5929
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5930
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5931
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5932
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5933
 
      hardcode_runpath_var=yes
5934
 
      runpath_var=LD_RUN_PATH
5935
 
      ;;
5936
 
 
5937
 
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
5938
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5939
 
      if test "$GCC" = yes; then
5940
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5941
 
      else
5942
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5943
 
      fi
5944
 
      runpath_var='LD_RUN_PATH'
5945
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5946
 
      ;;
5947
 
 
5948
 
    sysv5*)
5949
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5950
 
      # $CC -shared without GNU ld will not create a library from C++
5951
 
      # object files and a static libstdc++, better avoid it by now
5952
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5954
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5955
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5956
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5957
 
      runpath_var='LD_RUN_PATH'
 
6152
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
 
6153
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6154
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6155
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6156
      runpath_var='LD_RUN_PATH'
 
6157
 
 
6158
      if test "$GCC" = yes; then
 
6159
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6160
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6161
      else
 
6162
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6163
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6164
      fi
 
6165
      ;;
 
6166
 
 
6167
    sysv5* | sco3.2v5* | sco5v6*)
 
6168
      # Note: We can NOT use -z defs as we might desire, because we do not
 
6169
      # link with -lc, and that would cause any symbols used from libc to
 
6170
      # always be unresolved, which means just about no library would
 
6171
      # ever link correctly.  If we're not using GNU ld we use -z text
 
6172
      # though, which does catch some bad symbols but isn't as heavy-handed
 
6173
      # as -z defs.
 
6174
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6175
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
6176
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6177
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6178
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
6179
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6180
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6181
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
6182
      runpath_var='LD_RUN_PATH'
 
6183
 
 
6184
      if test "$GCC" = yes; then
 
6185
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6186
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6187
      else
 
6188
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6189
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6190
      fi
5958
6191
      ;;
5959
6192
 
5960
6193
    uts4*)
5972
6205
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5973
6206
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5974
6207
 
5975
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5976
 
if test "$GCC" = yes; then
5977
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5978
 
fi
5979
 
 
5980
6208
#
5981
6209
# Do we need to explicitly link libc?
5982
6210
#
6004
6232
        libobjs=conftest.$ac_objext
6005
6233
        deplibs=
6006
6234
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
6235
        pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6007
6236
        compiler_flags=-v
6008
6237
        linker_flags=-v
6009
6238
        verstring=
6192
6421
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6193
6422
fi
6194
6423
if test -n "$PKG_CONFIG"; then
6195
 
        _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
 
6424
        _pkg_min_version=m4_default([$1], [0.9.0])
6196
6425
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6197
6426
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6198
6427
                AC_MSG_RESULT([yes])
6228
6457
# ---------------------------------------------
6229
6458
m4_define([_PKG_CONFIG],
6230
6459
[if test -n "$PKG_CONFIG"; then
 
6460
    if test -n "$$1"; then
 
6461
        pkg_cv_[]$1="$$1"
 
6462
    else
6231
6463
        PKG_CHECK_EXISTS([$3],
6232
6464
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6233
6465
                         [pkg_failed=yes])
 
6466
    fi
6234
6467
else
6235
6468
        pkg_failed=untried
6236
6469
fi[]dnl
6237
6470
])# _PKG_CONFIG
6238
6471
 
 
6472
# _PKG_SHORT_ERRORS_SUPPORTED
 
6473
# -----------------------------
 
6474
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
6475
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
6476
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
6477
        _pkg_short_errors_supported=yes
 
6478
else
 
6479
        _pkg_short_errors_supported=no
 
6480
fi[]dnl
 
6481
])# _PKG_SHORT_ERRORS_SUPPORTED
 
6482
 
 
6483
 
6239
6484
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6240
6485
# [ACTION-IF-NOT-FOUND])
6241
6486
#
6257
6502
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6258
6503
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6259
6504
 
 
6505
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
6506
and $1[]_LIBS to avoid the need to call pkg-config.
 
6507
See the pkg-config man page for more details.])
 
6508
 
6260
6509
if test $pkg_failed = yes; then
6261
 
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
6510
        _PKG_SHORT_ERRORS_SUPPORTED
 
6511
        if test $_pkg_short_errors_supported = yes; then
 
6512
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
6513
        else 
 
6514
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
6515
        fi
6262
6516
        # Put the nasty error message in config.log where it belongs
6263
 
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
6517
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6264
6518
 
6265
6519
        ifelse([$4], , [AC_MSG_ERROR(dnl
6266
 
[Package requirements ($2) were not met.
 
6520
[Package requirements ($2) were not met:
 
6521
 
 
6522
$$1_PKG_ERRORS
 
6523
 
6267
6524
Consider adjusting the PKG_CONFIG_PATH environment variable if you
6268
6525
installed software in a non-standard prefix.
6269
6526
 
6270
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
6271
 
to avoid the need to call pkg-config.  See the pkg-config man page for
6272
 
more details.])],
 
6527
_PKG_TEXT
 
6528
])],
6273
6529
                [$4])
6274
6530
elif test $pkg_failed = untried; then
6275
6531
        ifelse([$4], , [AC_MSG_FAILURE(dnl
6277
6533
is in your PATH or set the PKG_CONFIG environment variable to the full
6278
6534
path to pkg-config.
6279
6535
 
6280
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
6281
 
to avoid the need to call pkg-config.  See the pkg-config man page for
6282
 
more details.
 
6536
_PKG_TEXT
6283
6537
 
6284
6538
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6285
6539
                [$4])