~ubuntu-branches/ubuntu/trusty/libprelude/trusty

« back to all changes in this revision

Viewing changes to m4/libtool.m4

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-06-10 08:50:59 UTC
  • mfrom: (1.1.13 upstream) (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090610085059-iflguu0i75ce5q4f
Tags: 0.9.23-1ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - Build-Depends on libltdl7-dev instead of libltdl3-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
380
380
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
381
381
# ---------------------------------------------------
382
382
m4_define([lt_decl_varnames_tagged],
383
 
[_$0(m4_quote(m4_default([$1], [[, ]])),
384
 
     m4_quote(m4_if([$2], [],
385
 
                     m4_quote(lt_decl_tag_varnames),
386
 
                  m4_quote(m4_shift($@)))),
387
 
     m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
388
 
m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
 
383
[m4_assert([$# <= 2])dnl
 
384
_$0(m4_quote(m4_default([$1], [[, ]])),
 
385
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
 
386
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
 
387
m4_define([_lt_decl_varnames_tagged],
 
388
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
389
389
 
390
390
 
391
391
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
945
945
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
946
946
    darwin1.*)
947
947
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
948
 
    darwin*) # darwin 5.x on 
 
948
    darwin*) # darwin 5.x on
949
949
      # if running on 10.5 or later, the deployment target defaults
950
950
      # to the OS version, if on x86, and 10.4, the deployment
951
 
      # target defaults to 10.4. Don't you love it? 
 
951
      # target defaults to 10.4. Don't you love it?
952
952
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
953
953
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
954
954
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
990
990
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
991
991
  _LT_TAGVAR(link_all_deplibs, $1)=yes
992
992
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
993
 
  if test "$GCC" = "yes"; then
 
993
  case $cc_basename in
 
994
     ifort*) _lt_dar_can_shared=yes ;;
 
995
     *) _lt_dar_can_shared=$GCC ;;
 
996
  esac
 
997
  if test "$_lt_dar_can_shared" = "yes"; then
994
998
    output_verbose_link_cmd=echo
995
999
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
996
1000
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1512
1516
    lt_cv_sys_max_cmd_len=-1;
1513
1517
    ;;
1514
1518
 
1515
 
  cygwin* | mingw*)
 
1519
  cygwin* | mingw* | cegcc*)
1516
1520
    # On Win9x/ME, this test blows up -- it succeeds, but takes
1517
1521
    # about 5 minutes as the teststring grows exponentially.
1518
1522
    # Worse, since 9x/ME are not pre-emptively multitasking,
1680
1684
#  endif
1681
1685
#endif
1682
1686
 
1683
 
#ifdef __cplusplus
1684
 
extern "C" void exit (int);
1685
 
#endif
1686
 
 
1687
1687
void fnord() { int i=42;}
1688
1688
int main ()
1689
1689
{
1699
1699
  else
1700
1700
    puts (dlerror ());
1701
1701
 
1702
 
    exit (status);
 
1702
  return status;
1703
1703
}]
1704
1704
_LT_EOF
1705
1705
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1738
1738
    lt_cv_dlopen_self=yes
1739
1739
    ;;
1740
1740
 
1741
 
  mingw* | pw32*)
 
1741
  mingw* | pw32* | cegcc*)
1742
1742
    lt_cv_dlopen="LoadLibrary"
1743
1743
    lt_cv_dlopen_libs=
1744
1744
    ;;
2035
2035
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2036
2036
m4_require([_LT_DECL_EGREP])dnl
2037
2037
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2038
m4_require([_LT_DECL_OBJDUMP])dnl
2038
2039
m4_require([_LT_DECL_SED])dnl
2039
2040
AC_MSG_CHECKING([dynamic linker characteristics])
2040
2041
m4_if([$1],
2199
2200
  # libtool to hard-code these into programs
2200
2201
  ;;
2201
2202
 
2202
 
cygwin* | mingw* | pw32*)
 
2203
cygwin* | mingw* | pw32* | cegcc*)
2203
2204
  version_type=windows
2204
2205
  shrext_cmds=".dll"
2205
2206
  need_version=no
2206
2207
  need_lib_prefix=no
2207
2208
 
2208
2209
  case $GCC,$host_os in
2209
 
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
2210
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2210
2211
    library_names_spec='$libname.dll.a'
2211
2212
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2212
2213
    postinstall_cmds='base_file=`basename \${file}`~
2229
2230
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2230
2231
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2231
2232
      ;;
2232
 
    mingw*)
 
2233
    mingw* | cegcc*)
2233
2234
      # MinGW DLLs use traditional 'lib' prefix
2234
2235
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235
2236
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2655
2656
  version_type=linux
2656
2657
  need_lib_prefix=no
2657
2658
  need_version=no
2658
 
  library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2659
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2659
2660
  shlibpath_var=LD_LIBRARY_PATH
2660
2661
  shlibpath_overrides_runpath=no
2661
2662
  hardcode_into_libs=yes
2679
2680
if test "$GCC" = yes; then
2680
2681
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2681
2682
fi
2682
 
 
 
2683
 
2683
2684
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2684
2685
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2685
2686
fi
2956
2957
#  -- PORTME fill in with the dynamic library characteristics
2957
2958
m4_defun([_LT_CHECK_MAGIC_METHOD],
2958
2959
[m4_require([_LT_DECL_EGREP])
 
2960
m4_require([_LT_DECL_OBJDUMP])
2959
2961
AC_CACHE_CHECK([how to recognize dependent libraries],
2960
2962
lt_cv_deplibs_check_method,
2961
2963
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3006
3008
  fi
3007
3009
  ;;
3008
3010
 
 
3011
cegcc)
 
3012
  # use the weaker test based on 'objdump'. See mingw*.
 
3013
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
 
3014
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3015
  ;;
 
3016
 
3009
3017
darwin* | rhapsody*)
3010
3018
  lt_cv_deplibs_check_method=pass_all
3011
3019
  ;;
3317
3325
aix*)
3318
3326
  symcode='[[BCDT]]'
3319
3327
  ;;
3320
 
cygwin* | mingw* | pw32*)
 
3328
cygwin* | mingw* | pw32* | cegcc*)
3321
3329
  symcode='[[ABCDGISTW]]'
3322
3330
  ;;
3323
3331
hpux*)
3563
3571
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3564
3572
      # PIC is the default for these OSes.
3565
3573
      ;;
3566
 
    mingw* | cygwin* | os2* | pw32*)
 
3574
    mingw* | cygwin* | os2* | pw32* | cegcc*)
3567
3575
      # This hack is so that the source file can tell whether it is being
3568
3576
      # built for inclusion in a dll (and should export symbols for example).
3569
3577
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3590
3598
      fi
3591
3599
      ;;
3592
3600
    hpux*)
3593
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3594
 
      # not for PA HP-UX.
 
3601
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
3602
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
3603
      # sets the default TLS model and affects inlining.
3595
3604
      case $host_cpu in
3596
 
      hppa*64*|ia64*)
 
3605
      hppa*64*)
3597
3606
        ;;
3598
3607
      *)
3599
3608
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3691
3700
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3692
3701
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3693
3702
            ;;
3694
 
          icpc* | ecpc* )
3695
 
            # Intel C++
 
3703
          ecpc* )
 
3704
            # old Intel C++ for x86_64 which still supported -KPIC.
3696
3705
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3697
3706
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3698
3707
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3699
3708
            ;;
 
3709
          icpc* )
 
3710
            # Intel C++, used to be incompatible with GCC.
 
3711
            # ICC 10 doesn't accept -KPIC any more.
 
3712
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3713
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
3714
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
3715
            ;;
3700
3716
          pgCC* | pgcpp*)
3701
3717
            # Portland Group C++ compiler
3702
3718
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3862
3878
      # PIC is the default for these OSes.
3863
3879
      ;;
3864
3880
 
3865
 
    mingw* | cygwin* | pw32* | os2*)
 
3881
    mingw* | cygwin* | pw32* | os2* | cegcc*)
3866
3882
      # This hack is so that the source file can tell whether it is being
3867
3883
      # built for inclusion in a dll (and should export symbols for example).
3868
3884
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3878
3894
      ;;
3879
3895
 
3880
3896
    hpux*)
3881
 
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3882
 
      # not for PA HP-UX.
 
3897
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
3898
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
3899
      # sets the default TLS model and affects inlining.
3883
3900
      case $host_cpu in
3884
 
      hppa*64*|ia64*)
 
3901
      hppa*64*)
3885
3902
        # +Z the default
3886
3903
        ;;
3887
3904
      *)
3931
3948
      fi
3932
3949
      ;;
3933
3950
 
3934
 
    mingw* | cygwin* | pw32* | os2*)
 
3951
    mingw* | cygwin* | pw32* | os2* | cegcc*)
3935
3952
      # This hack is so that the source file can tell whether it is being
3936
3953
      # built for inclusion in a dll (and should export symbols for example).
3937
3954
      m4_if([$1], [GCJ], [],
3962
3979
 
3963
3980
    linux* | k*bsd*-gnu)
3964
3981
      case $cc_basename in
3965
 
      icc* | ecc* | ifort*)
 
3982
      # old Intel for x86_64 which still supported -KPIC.
 
3983
      ecc*)
3966
3984
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3967
3985
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3968
3986
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3969
3987
        ;;
 
3988
      # icc used to be incompatible with GCC.
 
3989
      # ICC 10 doesn't accept -KPIC any more.
 
3990
      icc* | ifort*)
 
3991
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3992
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
3993
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
3994
        ;;
 
3995
      # Lahey Fortran 8.1.
 
3996
      lf95*)
 
3997
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3998
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 
3999
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 
4000
        ;;
3970
4001
      pgcc* | pgf77* | pgf90* | pgf95*)
3971
4002
        # Portland Group compilers (*not* the Pentium gcc compiler,
3972
4003
        # which looks to be a dead project)
4148
4179
  pw32*)
4149
4180
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4150
4181
  ;;
4151
 
  cygwin* | mingw*)
 
4182
  cygwin* | mingw* | cegcc*)
4152
4183
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4153
4184
  ;;
4154
4185
  *)
4200
4231
  extract_expsyms_cmds=
4201
4232
 
4202
4233
  case $host_os in
4203
 
  cygwin* | mingw* | pw32*)
 
4234
  cygwin* | mingw* | pw32* | cegcc*)
4204
4235
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4205
4236
    # When not using gcc, we currently assume that we are using
4206
4237
    # Microsoft Visual C++.
4287
4318
      fi
4288
4319
      ;;
4289
4320
 
4290
 
    cygwin* | mingw* | pw32*)
 
4321
    cygwin* | mingw* | pw32* | cegcc*)
4291
4322
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4292
4323
      # as there is no search path for DLLs.
4293
4324
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4353
4384
          tmp_addflag=' -i_dynamic -nofor_main' ;;
4354
4385
        ifc* | ifort*)                  # Intel Fortran compiler
4355
4386
          tmp_addflag=' -nofor_main' ;;
 
4387
        lf95*)                          # Lahey Fortran 8.1
 
4388
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
4389
          tmp_sharedflag='--shared' ;;
4356
4390
        xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
4357
4391
          tmp_sharedflag='-qmkshrobj'
4358
4392
          tmp_addflag= ;;
4584
4618
        fi
4585
4619
      fi
4586
4620
 
 
4621
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4587
4622
      # It seems that -bexpall does not export symbols beginning with
4588
4623
      # underscore (_), so it is better to generate a list of symbols to export.
4589
4624
      _LT_TAGVAR(always_export_symbols, $1)=yes
4638
4673
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4639
4674
      ;;
4640
4675
 
4641
 
    cygwin* | mingw* | pw32*)
 
4676
    cygwin* | mingw* | pw32* | cegcc*)
4642
4677
      # When not using gcc, we currently assume that we are using
4643
4678
      # Microsoft Visual C++.
4644
4679
      # hardcode_libdir_flag_spec is actually meaningless, as there is
4742
4777
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4743
4778
          ;;
4744
4779
        ia64*)
4745
 
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
4780
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4746
4781
          ;;
4747
4782
        *)
4748
4783
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5527
5562
          fi
5528
5563
        fi
5529
5564
 
 
5565
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5530
5566
        # It seems that -bexpall does not export symbols beginning with
5531
5567
        # underscore (_), so it is better to generate a list of symbols to
5532
5568
        # export.
5585
5621
        esac
5586
5622
        ;;
5587
5623
 
5588
 
      cygwin* | mingw* | pw32*)
 
5624
      cygwin* | mingw* | pw32* | cegcc*)
5589
5625
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5590
5626
        # as there is no search path for DLLs.
5591
5627
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6970
7006
])
6971
7007
 
6972
7008
 
 
7009
# _LT_DECL_OBJDUMP
 
7010
# --------------
 
7011
# If we don't have a new enough Autoconf to choose the best objdump
 
7012
# available, choose the one first in the user's PATH.
 
7013
m4_defun([_LT_DECL_OBJDUMP],
 
7014
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
7015
test -z "$OBJDUMP" && OBJDUMP=objdump
 
7016
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 
7017
AC_SUBST([OBJDUMP])
 
7018
])
 
7019
 
 
7020
 
6973
7021
# _LT_DECL_SED
6974
7022
# ------------
6975
7023
# Check for a fully-functional sed program, that truncates