From: Bruno Haible Date: Mon, 8 May 2006 19:43:08 +0000 (+0000) Subject: Add support for Sun C/C++ 5.9 on Linux. X-Git-Tag: v0.15~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9893f2e97027f434fb98882a5631b01c29f8a538;p=thirdparty%2Fgettext.git Add support for Sun C/C++ 5.9 on Linux. --- diff --git a/ChangeLog b/ChangeLog index 47c78ed6e..401ba8098 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ +2006-05-05 Bruno Haible + + * 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 - * 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 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 450c9241f..c2c97e890 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -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