]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Add support for Sun C/C++ 5.9 on Linux.
authorBruno Haible <bruno@clisp.org>
Mon, 8 May 2006 19:43:08 +0000 (19:43 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:14 +0000 (12:13 +0200)
ChangeLog
m4/libtool.m4

index 47c78ed6e4f72181ec339fd4bf02cb21a663da27..401ba8098b45ddc2b392bc9ebf83561054b0f6e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2006-05-05  Bruno Haible  <bruno@clisp.org>
+
+       * m4/libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): Add support for Sun C++
+       5.9 on Linux.
+       (AC_LIBTOOL_PROG_COMPILER_PIC): Add support for Sun C 5.9 and
+       Sun C++ 5.9.
+       (AC_LIBTOOL_PROG_LD_SHLIBS): Add support for Sun C 5.9.
+
 2006-04-26  Bruno Haible  <bruno@clisp.org>
 
-       * config/config.guess, config/config.sub: Update to GNU version
+       * build-aux/config.guess, build-aux/config.sub: Update to GNU version
        2006-04-26.
 
 2006-04-17  Bruno Haible  <bruno@clisp.org>
index 450c9241f03e1cba8a2ba6f545a1e4e1a6896c57..c2c97e890cd2e95e846ddc751a0f9600887692e2 100644 (file)
@@ -3353,6 +3353,25 @@ case $host_os in
        # dependencies.
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        ;;
+      CC*)
+       # Sun C++ 5,9
+       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+
+       # Not sure whether something based on
+       # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+       # would be better.
+       output_verbose_link_cmd='echo'
+
+       # Archives containing C++ object files must be created using
+       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+       ;;
     esac
     ;;
   lynxos*)
@@ -4990,6 +5009,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
            ;;
+         CC*)
+           # Sun C++ 5.9
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+           ;;
          *)
            ;;
        esac
@@ -5240,6 +5265,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
       como)
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-lopt='
         ;;
+      c89* | c99*)
+       # Sun C 5.9
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       ;;
       esac
       ;;
 
@@ -5550,13 +5581,19 @@ EOF
        ifc* | ifort*)                  # Intel Fortran compiler
          tmp_addflag=' -nofor_main' ;;
        esac
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       case $cc_basename in
+         c89* | c99*)                  # Sun C 5.9
+           tmp_sharedflag='-G' ;;
+         *)
+           tmp_sharedflag='-shared' ;;
+       esac
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
        if test $supports_anon_versioning = yes; then
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
   $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+         $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
        fi
       else
        _LT_AC_TAGVAR(ld_shlibs, $1)=no