~ubuntu-branches/ubuntu/quantal/colord/quantal-proposed

« back to all changes in this revision

Viewing changes to m4/libtool.m4

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-03-01 17:33:00 UTC
  • mto: (1.1.4) (2.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20120301173300-q1s2bs8yubnybln8
ImportĀ upstreamĀ versionĀ 0.1.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2
2
#
3
3
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4
 
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
5
 
#                 Inc.
 
4
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 
5
#                 Foundation, Inc.
6
6
#   Written by Gordon Matzigkeit, 1996
7
7
#
8
8
# This file is free software; the Free Software Foundation gives
11
11
 
12
12
m4_define([_LT_COPYING], [dnl
13
13
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14
 
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
15
 
#                 Inc.
 
14
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 
15
#                 Foundation, Inc.
16
16
#   Written by Gordon Matzigkeit, 1996
17
17
#
18
18
#   This file is part of GNU Libtool.
146
146
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
147
147
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
148
148
 
 
149
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
 
150
dnl
149
151
_LT_DECL([], [host_alias], [0], [The host system])dnl
150
152
_LT_DECL([], [host], [0])dnl
151
153
_LT_DECL([], [host_os], [0])dnl
637
639
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
638
640
configured by $[0], generated by m4_PACKAGE_STRING.
639
641
 
640
 
Copyright (C) 2010 Free Software Foundation, Inc.
 
642
Copyright (C) 2011 Free Software Foundation, Inc.
641
643
This config.lt script is free software; the Free Software Foundation
642
644
gives unlimited permision to copy, distribute and modify it."
643
645
 
801
803
m4_case([$1],
802
804
  [C],                  [_LT_LANG(C)],
803
805
  [C++],                [_LT_LANG(CXX)],
 
806
  [Go],                 [_LT_LANG(GO)],
804
807
  [Java],               [_LT_LANG(GCJ)],
805
808
  [Fortran 77],         [_LT_LANG(F77)],
806
809
  [Fortran],            [_LT_LANG(FC)],
822
825
])# _LT_LANG
823
826
 
824
827
 
 
828
m4_ifndef([AC_PROG_GO], [
 
829
############################################################
 
830
# NOTE: This macro has been submitted for inclusion into   #
 
831
#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
 
832
#  a released version of Autoconf we should remove this    #
 
833
#  macro and use it instead.                               #
 
834
############################################################
 
835
m4_defun([AC_PROG_GO],
 
836
[AC_LANG_PUSH(Go)dnl
 
837
AC_ARG_VAR([GOC],     [Go compiler command])dnl
 
838
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
 
839
_AC_ARG_VAR_LDFLAGS()dnl
 
840
AC_CHECK_TOOL(GOC, gccgo)
 
841
if test -z "$GOC"; then
 
842
  if test -n "$ac_tool_prefix"; then
 
843
    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
 
844
  fi
 
845
fi
 
846
if test -z "$GOC"; then
 
847
  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
 
848
fi
 
849
])#m4_defun
 
850
])#m4_ifndef
 
851
 
 
852
 
825
853
# _LT_LANG_DEFAULT_CONFIG
826
854
# -----------------------
827
855
m4_defun([_LT_LANG_DEFAULT_CONFIG],
852
880
       m4_ifdef([LT_PROG_GCJ],
853
881
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
854
882
 
 
883
AC_PROVIDE_IFELSE([AC_PROG_GO],
 
884
  [LT_LANG(GO)],
 
885
  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
 
886
 
855
887
AC_PROVIDE_IFELSE([LT_PROG_RC],
856
888
  [LT_LANG(RC)],
857
889
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
954
986
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
955
987
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
956
988
        _lt_result=$?
957
 
        if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
 
989
        # If there is a non-empty error log, and "single_module"
 
990
        # appears in it, assume the flag caused a linker warning
 
991
        if test -s conftest.err && $GREP single_module conftest.err; then
 
992
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
993
        # Otherwise, if the output was created with a 0 exit code from
 
994
        # the compiler, it worked.
 
995
        elif test -f libconftest.dylib && test $_lt_result -eq 0; then
958
996
          lt_cv_apple_cc_single_mod=yes
959
997
        else
960
998
          cat conftest.err >&AS_MESSAGE_LOG_FD
962
1000
        rm -rf libconftest.dylib*
963
1001
        rm -f conftest.*
964
1002
      fi])
 
1003
 
965
1004
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
966
1005
      [lt_cv_ld_exported_symbols_list],
967
1006
      [lt_cv_ld_exported_symbols_list=no
973
1012
        [lt_cv_ld_exported_symbols_list=no])
974
1013
        LDFLAGS="$save_LDFLAGS"
975
1014
    ])
 
1015
 
976
1016
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
977
1017
      [lt_cv_ld_force_load=no
978
1018
      cat > conftest.c << _LT_EOF
990
1030
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
991
1031
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
992
1032
      _lt_result=$?
993
 
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
 
1033
      if test -s conftest.err && $GREP force_load conftest.err; then
 
1034
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
1035
      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
994
1036
        lt_cv_ld_force_load=yes
995
1037
      else
996
1038
        cat conftest.err >&AS_MESSAGE_LOG_FD
1035
1077
])
1036
1078
 
1037
1079
 
1038
 
# _LT_DARWIN_LINKER_FEATURES
1039
 
# --------------------------
 
1080
# _LT_DARWIN_LINKER_FEATURES([TAG])
 
1081
# ---------------------------------
1040
1082
# Checks for linker and compiler features on darwin
1041
1083
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1042
1084
[
1047
1089
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1048
1090
  if test "$lt_cv_ld_force_load" = "yes"; then
1049
1091
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
1092
    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
 
1093
                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1050
1094
  else
1051
1095
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1052
1096
  fi
1330
1374
    CFLAGS="$SAVE_CFLAGS"
1331
1375
  fi
1332
1376
  ;;
1333
 
sparc*-*solaris*)
 
1377
*-*solaris*)
1334
1378
  # Find out which ABI we are using.
1335
1379
  echo 'int i;' > conftest.$ac_ext
1336
1380
  if AC_TRY_EVAL(ac_compile); then
1337
1381
    case `/usr/bin/file conftest.o` in
1338
1382
    *64-bit*)
1339
1383
      case $lt_cv_prog_gnu_ld in
1340
 
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
1384
      yes*)
 
1385
        case $host in
 
1386
        i?86-*-solaris*)
 
1387
          LD="${LD-ld} -m elf_x86_64"
 
1388
          ;;
 
1389
        sparc*-*-solaris*)
 
1390
          LD="${LD-ld} -m elf64_sparc"
 
1391
          ;;
 
1392
        esac
 
1393
        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
 
1394
        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
 
1395
          LD="${LD-ld}_sol2"
 
1396
        fi
 
1397
        ;;
1341
1398
      *)
1342
1399
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1343
1400
          LD="${LD-ld} -64"
1414
1471
if test -n "$RANLIB"; then
1415
1472
  case $host_os in
1416
1473
  openbsd*)
1417
 
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
1474
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1418
1475
    ;;
1419
1476
  *)
1420
 
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
1477
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1421
1478
    ;;
1422
1479
  esac
1423
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
1480
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1424
1481
fi
1425
1482
 
1426
1483
case $host_os in
1600
1657
    lt_cv_sys_max_cmd_len=196608
1601
1658
    ;;
1602
1659
 
 
1660
  os2*)
 
1661
    # The test takes a long time on OS/2.
 
1662
    lt_cv_sys_max_cmd_len=8192
 
1663
    ;;
 
1664
 
1603
1665
  osf*)
1604
1666
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1605
1667
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1639
1701
      # If test is not a shell built-in, we'll probably end up computing a
1640
1702
      # maximum length that is only half of the actual maximum length, but
1641
1703
      # we can't tell.
1642
 
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
 
1704
      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1643
1705
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1644
1706
              test $i != 17 # 1/2 MB should be enough
1645
1707
      do
2185
2247
 
2186
2248
case $host_os in
2187
2249
aix3*)
2188
 
  version_type=linux
 
2250
  version_type=linux # correct to gnu/linux during the next big refactor
2189
2251
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2190
2252
  shlibpath_var=LIBPATH
2191
2253
 
2194
2256
  ;;
2195
2257
 
2196
2258
aix[[4-9]]*)
2197
 
  version_type=linux
 
2259
  version_type=linux # correct to gnu/linux during the next big refactor
2198
2260
  need_lib_prefix=no
2199
2261
  need_version=no
2200
2262
  hardcode_into_libs=yes
2259
2321
  ;;
2260
2322
 
2261
2323
bsdi[[45]]*)
2262
 
  version_type=linux
 
2324
  version_type=linux # correct to gnu/linux during the next big refactor
2263
2325
  need_version=no
2264
2326
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2265
2327
  soname_spec='${libname}${release}${shared_ext}$major'
2398
2460
  ;;
2399
2461
 
2400
2462
dgux*)
2401
 
  version_type=linux
 
2463
  version_type=linux # correct to gnu/linux during the next big refactor
2402
2464
  need_lib_prefix=no
2403
2465
  need_version=no
2404
2466
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2406
2468
  shlibpath_var=LD_LIBRARY_PATH
2407
2469
  ;;
2408
2470
 
2409
 
freebsd1*)
2410
 
  dynamic_linker=no
2411
 
  ;;
2412
 
 
2413
2471
freebsd* | dragonfly*)
2414
2472
  # DragonFly does not have aout.  When/if they implement a new
2415
2473
  # versioning mechanism, adjust this.
2417
2475
    objformat=`/usr/bin/objformat`
2418
2476
  else
2419
2477
    case $host_os in
2420
 
    freebsd[[123]]*) objformat=aout ;;
 
2478
    freebsd[[23]].*) objformat=aout ;;
2421
2479
    *) objformat=elf ;;
2422
2480
    esac
2423
2481
  fi
2435
2493
  esac
2436
2494
  shlibpath_var=LD_LIBRARY_PATH
2437
2495
  case $host_os in
2438
 
  freebsd2*)
 
2496
  freebsd2.*)
2439
2497
    shlibpath_overrides_runpath=yes
2440
2498
    ;;
2441
2499
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2455
2513
  ;;
2456
2514
 
2457
2515
gnu*)
2458
 
  version_type=linux
 
2516
  version_type=linux # correct to gnu/linux during the next big refactor
2459
2517
  need_lib_prefix=no
2460
2518
  need_version=no
2461
2519
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2462
2520
  soname_spec='${libname}${release}${shared_ext}$major'
2463
2521
  shlibpath_var=LD_LIBRARY_PATH
 
2522
  shlibpath_overrides_runpath=no
2464
2523
  hardcode_into_libs=yes
2465
2524
  ;;
2466
2525
 
2467
2526
haiku*)
2468
 
  version_type=linux
 
2527
  version_type=linux # correct to gnu/linux during the next big refactor
2469
2528
  need_lib_prefix=no
2470
2529
  need_version=no
2471
2530
  dynamic_linker="$host_os runtime_loader"
2526
2585
  ;;
2527
2586
 
2528
2587
interix[[3-9]]*)
2529
 
  version_type=linux
 
2588
  version_type=linux # correct to gnu/linux during the next big refactor
2530
2589
  need_lib_prefix=no
2531
2590
  need_version=no
2532
2591
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2542
2601
    nonstopux*) version_type=nonstopux ;;
2543
2602
    *)
2544
2603
        if test "$lt_cv_prog_gnu_ld" = yes; then
2545
 
                version_type=linux
 
2604
                version_type=linux # correct to gnu/linux during the next big refactor
2546
2605
        else
2547
2606
                version_type=irix
2548
2607
        fi ;;
2579
2638
  dynamic_linker=no
2580
2639
  ;;
2581
2640
 
2582
 
# This must be Linux ELF.
 
2641
# This must be glibc/ELF.
2583
2642
linux* | k*bsd*-gnu | kopensolaris*-gnu)
2584
 
  version_type=linux
 
2643
  version_type=linux # correct to gnu/linux during the next big refactor
2585
2644
  need_lib_prefix=no
2586
2645
  need_version=no
2587
2646
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2648
2707
  ;;
2649
2708
 
2650
2709
newsos6)
2651
 
  version_type=linux
 
2710
  version_type=linux # correct to gnu/linux during the next big refactor
2652
2711
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2653
2712
  shlibpath_var=LD_LIBRARY_PATH
2654
2713
  shlibpath_overrides_runpath=yes
2717
2776
  ;;
2718
2777
 
2719
2778
solaris*)
2720
 
  version_type=linux
 
2779
  version_type=linux # correct to gnu/linux during the next big refactor
2721
2780
  need_lib_prefix=no
2722
2781
  need_version=no
2723
2782
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2742
2801
  ;;
2743
2802
 
2744
2803
sysv4 | sysv4.3*)
2745
 
  version_type=linux
 
2804
  version_type=linux # correct to gnu/linux during the next big refactor
2746
2805
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2747
2806
  soname_spec='${libname}${release}${shared_ext}$major'
2748
2807
  shlibpath_var=LD_LIBRARY_PATH
2766
2825
 
2767
2826
sysv4*MP*)
2768
2827
  if test -d /usr/nec ;then
2769
 
    version_type=linux
 
2828
    version_type=linux # correct to gnu/linux during the next big refactor
2770
2829
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2771
2830
    soname_spec='$libname${shared_ext}.$major'
2772
2831
    shlibpath_var=LD_LIBRARY_PATH
2797
2856
 
2798
2857
tpf*)
2799
2858
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2800
 
  version_type=linux
 
2859
  version_type=linux # correct to gnu/linux during the next big refactor
2801
2860
  need_lib_prefix=no
2802
2861
  need_version=no
2803
2862
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2807
2866
  ;;
2808
2867
 
2809
2868
uts4*)
2810
 
  version_type=linux
 
2869
  version_type=linux # correct to gnu/linux during the next big refactor
2811
2870
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2812
2871
  soname_spec='${libname}${release}${shared_ext}$major'
2813
2872
  shlibpath_var=LD_LIBRARY_PATH
3229
3288
  lt_cv_deplibs_check_method=pass_all
3230
3289
  ;;
3231
3290
 
3232
 
# This must be Linux ELF.
 
3291
# This must be glibc/ELF.
3233
3292
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3234
3293
  lt_cv_deplibs_check_method=pass_all
3235
3294
  ;;
3649
3708
    # which start with @ or ?.
3650
3709
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3651
3710
"     {last_section=section; section=\$ 3};"\
 
3711
"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3652
3712
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3653
3713
"     \$ 0!~/External *\|/{next};"\
3654
3714
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4233
4293
    case $cc_basename in
4234
4294
    nvcc*) # Cuda Compiler Driver 2.2
4235
4295
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4236
 
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
 
4296
      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
4297
        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
 
4298
      fi
4237
4299
      ;;
4238
4300
    esac
4239
4301
  else
4325
4387
        ;;
4326
4388
      *)
4327
4389
        case `$CC -V 2>&1 | sed 5q` in
4328
 
        *Sun\ F* | *Sun*Fortran*)
 
4390
        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4329
4391
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
4330
4392
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4331
4393
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4332
4394
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4333
4395
          ;;
 
4396
        *Sun\ F* | *Sun*Fortran*)
 
4397
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4398
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4399
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4400
          ;;
4334
4401
        *Sun\ C*)
4335
4402
          # Sun C 5.9
4336
4403
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4337
4404
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4338
4405
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4339
4406
          ;;
 
4407
        *Intel*\ [[CF]]*Compiler*)
 
4408
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4409
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4410
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4411
          ;;
 
4412
        *Portland\ Group*)
 
4413
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4414
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
4415
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4416
          ;;
4340
4417
        esac
4341
4418
        ;;
4342
4419
      esac
4496
4573
    ;;
4497
4574
  cygwin* | mingw* | cegcc*)
4498
4575
    case $cc_basename in
4499
 
    cl*) ;;
 
4576
    cl*)
 
4577
      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 
4578
      ;;
4500
4579
    *)
4501
4580
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4502
4581
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4521
4600
  _LT_TAGVAR(hardcode_direct, $1)=no
4522
4601
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4523
4602
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4524
 
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4525
4603
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4526
4604
  _LT_TAGVAR(hardcode_minus_L, $1)=no
4527
4605
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4772
4850
        xlf* | bgf* | bgxlf* | mpixlf*)
4773
4851
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4774
4852
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4775
 
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4776
 
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
4853
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4777
4854
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4778
4855
          if test "x$supports_anon_versioning" = xyes; then
4779
4856
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5068
5145
        # The linker will not automatically build a static lib if we build a DLL.
5069
5146
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5070
5147
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5148
        _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5071
5149
        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5072
5150
        # Don't use ranlib
5073
5151
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5114
5192
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5115
5193
      ;;
5116
5194
 
5117
 
    freebsd1*)
5118
 
      _LT_TAGVAR(ld_shlibs, $1)=no
5119
 
      ;;
5120
 
 
5121
5195
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5122
5196
    # support.  Future versions do this automatically, but an explicit c++rt0.o
5123
5197
    # does not break anything, and helps significantly (at the cost of a little
5130
5204
      ;;
5131
5205
 
5132
5206
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5133
 
    freebsd2*)
 
5207
    freebsd2.*)
5134
5208
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5135
5209
      _LT_TAGVAR(hardcode_direct, $1)=yes
5136
5210
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5169
5243
      fi
5170
5244
      if test "$with_gnu_ld" = no; then
5171
5245
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5172
 
        _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5173
5246
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5174
5247
        _LT_TAGVAR(hardcode_direct, $1)=yes
5175
5248
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5611
5684
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5612
5685
    [Flag to hardcode $libdir into a binary during linking.
5613
5686
    This must work even if $libdir does not exist])
5614
 
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5615
 
    [[If ld is used when linking, flag to hardcode $libdir into a binary
5616
 
    during linking.  This must work even if $libdir does not exist]])
5617
5687
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5618
5688
    [Whether we need a single "-rpath" flag with a separated argument])
5619
5689
_LT_TAGDECL([], [hardcode_direct], [0],
5771
5841
_LT_TAGVAR(hardcode_direct, $1)=no
5772
5842
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5773
5843
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5774
 
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5775
5844
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5776
5845
_LT_TAGVAR(hardcode_minus_L, $1)=no
5777
5846
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6141
6210
        esac
6142
6211
        ;;
6143
6212
 
6144
 
      freebsd[[12]]*)
 
6213
      freebsd2.*)
6145
6214
        # C++ shared libraries reported to be fairly broken before
6146
6215
        # switch to ELF
6147
6216
        _LT_TAGVAR(ld_shlibs, $1)=no
6902
6971
  }
6903
6972
};
6904
6973
_LT_EOF
 
6974
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
 
6975
package foo
 
6976
func foo() {
 
6977
}
 
6978
_LT_EOF
6905
6979
])
6906
6980
 
6907
6981
_lt_libdeps_save_CFLAGS=$CFLAGS
6908
6982
case "$CC $CFLAGS " in #(
6909
6983
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6910
6984
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
 
6985
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6911
6986
esac
6912
6987
 
6913
6988
dnl Parse the compiler output and extract the necessary
7104
7179
_LT_TAGVAR(hardcode_direct, $1)=no
7105
7180
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7106
7181
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7107
 
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7108
7182
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7109
7183
_LT_TAGVAR(hardcode_minus_L, $1)=no
7110
7184
_LT_TAGVAR(hardcode_automatic, $1)=no
7237
7311
_LT_TAGVAR(hardcode_direct, $1)=no
7238
7312
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7239
7313
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7240
 
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7241
7314
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7242
7315
_LT_TAGVAR(hardcode_minus_L, $1)=no
7243
7316
_LT_TAGVAR(hardcode_automatic, $1)=no
7424
7497
])# _LT_LANG_GCJ_CONFIG
7425
7498
 
7426
7499
 
 
7500
# _LT_LANG_GO_CONFIG([TAG])
 
7501
# --------------------------
 
7502
# Ensure that the configuration variables for the GNU Go compiler
 
7503
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
7504
# to write the compiler configuration to `libtool'.
 
7505
m4_defun([_LT_LANG_GO_CONFIG],
 
7506
[AC_REQUIRE([LT_PROG_GO])dnl
 
7507
AC_LANG_SAVE
 
7508
 
 
7509
# Source file extension for Go test sources.
 
7510
ac_ext=go
 
7511
 
 
7512
# Object file extension for compiled Go test sources.
 
7513
objext=o
 
7514
_LT_TAGVAR(objext, $1)=$objext
 
7515
 
 
7516
# Code to be used in simple compile tests
 
7517
lt_simple_compile_test_code="package main; func main() { }"
 
7518
 
 
7519
# Code to be used in simple link tests
 
7520
lt_simple_link_test_code='package main; func main() { }'
 
7521
 
 
7522
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7523
_LT_TAG_COMPILER
 
7524
 
 
7525
# save warnings/boilerplate of simple test code
 
7526
_LT_COMPILER_BOILERPLATE
 
7527
_LT_LINKER_BOILERPLATE
 
7528
 
 
7529
# Allow CC to be a program name with arguments.
 
7530
lt_save_CC=$CC
 
7531
lt_save_CFLAGS=$CFLAGS
 
7532
lt_save_GCC=$GCC
 
7533
GCC=yes
 
7534
CC=${GOC-"gccgo"}
 
7535
CFLAGS=$GOFLAGS
 
7536
compiler=$CC
 
7537
_LT_TAGVAR(compiler, $1)=$CC
 
7538
_LT_TAGVAR(LD, $1)="$LD"
 
7539
_LT_CC_BASENAME([$compiler])
 
7540
 
 
7541
# Go did not exist at the time GCC didn't implicitly link libc in.
 
7542
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7543
 
 
7544
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7545
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7546
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
7547
 
 
7548
## CAVEAT EMPTOR:
 
7549
## There is no encapsulation within the following macros, do not change
 
7550
## the running order or otherwise move them around unless you know exactly
 
7551
## what you are doing...
 
7552
if test -n "$compiler"; then
 
7553
  _LT_COMPILER_NO_RTTI($1)
 
7554
  _LT_COMPILER_PIC($1)
 
7555
  _LT_COMPILER_C_O($1)
 
7556
  _LT_COMPILER_FILE_LOCKS($1)
 
7557
  _LT_LINKER_SHLIBS($1)
 
7558
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
7559
 
 
7560
  _LT_CONFIG($1)
 
7561
fi
 
7562
 
 
7563
AC_LANG_RESTORE
 
7564
 
 
7565
GCC=$lt_save_GCC
 
7566
CC=$lt_save_CC
 
7567
CFLAGS=$lt_save_CFLAGS
 
7568
])# _LT_LANG_GO_CONFIG
 
7569
 
 
7570
 
7427
7571
# _LT_LANG_RC_CONFIG([TAG])
7428
7572
# -------------------------
7429
7573
# Ensure that the configuration variables for the Windows resource compiler
7493
7637
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7494
7638
 
7495
7639
 
 
7640
# LT_PROG_GO
 
7641
# ----------
 
7642
AC_DEFUN([LT_PROG_GO],
 
7643
[AC_CHECK_TOOL(GOC, gccgo,)
 
7644
])
 
7645
 
 
7646
 
7496
7647
# LT_PROG_RC
7497
7648
# ----------
7498
7649
AC_DEFUN([LT_PROG_RC],