joachim99@2: #### This script is meant to be sourced by ltconfig. joachim99@2: joachim99@2: # ltcf-cxx.sh - Create a C++ compiler specific configuration joachim99@2: # joachim99@2: # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. joachim99@2: # Originally by Gordon Matzigkeit , 1996 joachim99@2: # joachim99@2: # Original C++ support by:Gary V. Vaughan joachim99@2: # Alexandre Oliva joachim99@2: # Ossama Othman joachim99@2: # Thomas Thanner joachim99@2: # joachim99@2: # This file is free software; you can redistribute it and/or modify it joachim99@2: # under the terms of the GNU General Public License as published by joachim99@2: # the Free Software Foundation; either version 2 of the License, or joachim99@2: # (at your option) any later version. joachim99@2: # joachim99@2: # This program is distributed in the hope that it will be useful, but joachim99@2: # WITHOUT ANY WARRANTY; without even the implied warranty of joachim99@2: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU joachim99@2: # General Public License for more details. joachim99@2: # joachim99@2: # You should have received a copy of the GNU General Public License joachim99@2: # along with this program; if not, write to the Free Software joachim99@2: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. joachim99@2: # joachim99@2: # As a special exception to the GNU General Public License, if you joachim99@2: # distribute this file as part of a program that contains a joachim99@2: # configuration script generated by Autoconf, you may include it under joachim99@2: # the same distribution terms that you use for the rest of that program. joachim99@2: joachim99@2: joachim99@2: # Source file extension for C++ test sources. joachim99@2: ac_ext=cc joachim99@2: joachim99@2: # Object file extension for compiled C++ test sources. joachim99@2: objext=o joachim99@2: joachim99@2: # Code to be used in simple compile tests joachim99@2: lt_simple_compile_test_code="int some_variable = 0;" joachim99@2: joachim99@2: # Code to be used in simple link tests joachim99@2: lt_simple_link_test_code='int main(int, char *[]) { return (0); }' joachim99@2: joachim99@2: # C++ compiler joachim99@2: CXX=${CXX-c++} joachim99@2: joachim99@2: # ltmain only uses $CC for tagged configurations so make sure $CC is set. joachim99@2: CC=${CC-"$CXX"} joachim99@2: CFLAGS=${CFLAGS-"$CXXFLAGS"} joachim99@2: joachim99@2: # Allow CC (or CXX) to be a program name with arguments. joachim99@2: set dummy $CC joachim99@2: compiler=$2 joachim99@2: cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` joachim99@2: joachim99@2: # we are optimistic. (Too optimistic if you ask me, down there we switch it joachim99@2: # off again for most platforms ;) (MM) joachim99@2: ld_shlibs=yes joachim99@2: joachim99@2: # Check if we are using GNU gcc (taken/adapted from configure script) joachim99@2: # We need to check here since "--with-gcc" is set at configure time, joachim99@2: # not ltconfig time! joachim99@2: cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then joachim99@2: with_gcc=yes joachim99@2: joachim99@2: # Set up default GNU C++ configuration joachim99@2: joachim99@2: # Check if GNU C++ uses GNU ld as the underlying linker, since the joachim99@2: # archiving commands below assume that GNU ld is being used. joachim99@2: if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ joachim99@2: egrep 'GNU ld' > /dev/null; then joachim99@2: with_gnu_ld=yes joachim99@2: joachim99@2: archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' joachim99@2: joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' joachim99@2: export_dynamic_flag_spec='${wl}--export-dynamic' joachim99@2: joachim99@2: # If archive_cmds runs LD, not CC, wlarc should be empty joachim99@2: # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to joachim99@2: # investigate it a little bit more. (MM) joachim99@2: wlarc='${wl}' joachim99@2: joachim99@2: # ancient GNU ld didn't support --whole-archive et. al. joachim99@2: if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ joachim99@2: egrep 'no-whole-archive' > /dev/null; then joachim99@2: whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' joachim99@2: else joachim99@2: whole_archive_flag_spec= joachim99@2: fi joachim99@2: else joachim99@2: with_gnu_ld=no joachim99@2: wlarc= joachim99@2: joachim99@2: # A generic and very simple default shared library creation joachim99@2: # command for GNU C++ for the case where it uses the native joachim99@2: # linker, instead of GNU ld. If possible, this setting should joachim99@2: # overridden to take advantage of the native linker features on joachim99@2: # the platform it is being used on. joachim99@2: archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' joachim99@2: fi joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' joachim99@2: joachim99@2: else joachim99@2: with_gcc=no joachim99@2: with_gnu_ld=no joachim99@2: wlarc= joachim99@2: fi joachim99@2: joachim99@2: echo "ltcf-cxx: with_gcc=$with_gcc ; with_gnu_ld=$with_gnu_ld" joachim99@2: joachim99@2: # PORTME: fill in a description of your system's C++ link characteristics joachim99@2: case $host_os in joachim99@2: aix3*) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: aix4* | aix5*) joachim99@2: archive_cmds='' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_libdir_separator=':' joachim99@2: link_all_deplibs=yes joachim99@2: # When large executables or shared objects are built, AIX ld can joachim99@2: # have problems creating the table of contents. If linking a library joachim99@2: # or program results in "error TOC overflow" add -mminimal-toc to joachim99@2: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not joachim99@2: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. joachim99@2: if test "$with_gcc" = yes; then joachim99@2: case $host_os in aix4.[012]|aix4.[012].*) joachim99@2: # We only want to do this on AIX 4.2 and lower, the check joachim99@2: # below for broken collect2 doesn't work under 4.3+ joachim99@2: collect2name=`${CC} -print-prog-name=collect2` joachim99@2: if test -f "$collect2name" && \ joachim99@2: strings "$collect2name" | grep resolve_lib_name >/dev/null joachim99@2: then joachim99@2: # We have reworked collect2 joachim99@2: hardcode_direct=yes joachim99@2: else joachim99@2: # We have old collect2 joachim99@2: hardcode_direct=unsupported joachim99@2: # It fails to find uninstalled libraries when the uninstalled joachim99@2: # path is not listed in the libpath. Setting hardcode_minus_L joachim99@2: # to unsupported forces relinking joachim99@2: hardcode_minus_L=yes joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_libdir_separator= joachim99@2: fi joachim99@2: esac joachim99@2: shared_flag='-shared' joachim99@2: else joachim99@2: # not using gcc joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: shared_flag='${wl}-G' joachim99@2: else joachim99@2: shared_flag='${wl}-bM:SRE' joachim99@2: fi joachim99@2: fi joachim99@2: joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: # On IA64, the linker does run time linking by default, so we don't joachim99@2: # have to do anything special. joachim99@2: aix_use_runtimelinking=no joachim99@2: exp_sym_flag='-Bexport' joachim99@2: no_entry_flag="" joachim99@2: else joachim99@2: # KDE requires run time linking. Make it the default. joachim99@2: aix_use_runtimelinking=yes joachim99@2: exp_sym_flag='-bexport' joachim99@2: no_entry_flag='-bnoentry' joachim99@2: fi joachim99@2: # Let the compiler handle the export list. joachim99@2: always_export_symbols=no joachim99@2: if test "$aix_use_runtimelinking" = yes; then joachim99@2: allow_undefined_flag=' ${wl}-berok' joachim99@2: # The following three lines along with hardcode_into_libs=yes put the correct path into libraries. joachim99@2: hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib' joachim99@2: archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib' joachim99@2: archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib' joachim99@2: else joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib' joachim99@2: allow_undefined_flag="-z nodefs" joachim99@2: archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib' joachim99@2: archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib' joachim99@2: else joachim99@2: hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' joachim99@2: # Warning - without using the other run time loading flags, -berok will joachim99@2: # link without error, but may produce a broken library. joachim99@2: no_undefined_flag='${wl}-bnoerok' joachim99@2: allow_undefined_flag='${wl}-berok" joachim99@2: # -bexpall does not export symbols beginning with underscore (_) joachim99@2: always_export_symbols=yes joachim99@2: # Exported symbols can be pulled into shared objects from archives joachim99@2: whole_archive_flag_spec=' ' joachim99@2: build_libtool_need_lc=yes joachim99@2: # This is similar to how AIX traditionally builds it's shared libraries. joachim99@2: archive_expsym_cmds="\$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' joachim99@2: fi joachim99@2: fi joachim99@2: ;; joachim99@2: chorus*) joachim99@2: case $cc_basename in joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: dgux*) joachim99@2: case $cc_basename in joachim99@2: ec++) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: ghcx) joachim99@2: # Green Hills C++ Compiler joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: freebsd*) joachim99@2: # FreeBSD uses GNU C++ and GNU ld joachim99@2: skip_need_lc_check=yes joachim99@2: remove_lgcc=yes joachim99@2: ;; joachim99@2: hpux*) joachim99@2: hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: hardcode_direct=yes joachim99@2: hardcode_minus_L=yes # Not in the search PATH, but as the default joachim99@2: # location of the library. joachim99@2: export_dynamic_flag_spec='${wl}-E' joachim99@2: joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: aCC) joachim99@2: case $host_os in joachim99@2: hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; joachim99@2: *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; joachim99@2: esac joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: # joachim99@2: # There doesn't appear to be a way to prevent this compiler from joachim99@2: # explicitly linking system object files so we need to strip them joachim99@2: # from the output so that they don't get included in the library joachim99@2: # dependencies. joachim99@2: output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' joachim99@2: ;; joachim99@2: *) joachim99@2: if test "$with_gcc" = yes && test "$with_gnu_ld" = no ; then joachim99@2: # MM: for HP-UX and g++ -fPIC is needed to link pic objects together joachim99@2: case $host_os in joachim99@2: hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; joachim99@2: *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; joachim99@2: esac joachim99@2: output_verbose_link_cmds='$CC -shared -fPIC $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' joachim99@2: remove_lgcc=yes joachim99@2: fi joachim99@2: if test "$with_gcc" = no ; then joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: irix5* | irix6*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # SGI C++ joachim99@2: archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' joachim99@2: joachim99@2: # Archives containing C++ object files must be created using joachim99@2: # "CC -ar", where "CC" is the IRIX C++ compiler. This is joachim99@2: # necessary to make sure instantiated templates are included joachim99@2: # in the archive. joachim99@2: old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs' joachim99@2: ;; joachim99@2: *) joachim99@2: if test "$with_gcc" = yes; then joachim99@2: if test "$with_gnu_ld" = no; then joachim99@2: archive_cmds='$CC -D_LANGUAGE_C_CPLUS_PLUS -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' joachim99@2: else joachim99@2: archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' joachim99@2: fi joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: link_all_deplibs=yes joachim99@2: ;; joachim99@2: linux*) joachim99@2: case $cc_basename in joachim99@2: KCC) joachim99@2: # Kuck and Associates, Inc. (KAI) C++ Compiler joachim99@2: joachim99@2: # KCC will only create a shared library if the output file joachim99@2: # ends with ".so" (or ".sl" for HP-UX), so rename the library joachim99@2: # to its proper name (with version) after linking. joachim99@2: archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib; test \$templib = $lib || mv \$templib $lib' joachim99@2: archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; test \$templib = $lib || mv \$templib $lib' joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: # joachim99@2: # There doesn't appear to be a way to prevent this compiler from joachim99@2: # explicitly linking system object files so we need to strip them joachim99@2: # from the output so that they don't get included in the library joachim99@2: # dependencies. joachim99@2: output_verbose_link_cmds='echo "go to hell"' joachim99@2: skip_need_lc_check=yes joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}--rpath,$libdir' joachim99@2: export_dynamic_flag_spec='${wl}--export-dynamic' joachim99@2: joachim99@2: # Archives containing C++ object files must be created using joachim99@2: # "CC -Bstatic", where "CC" is the KAI C++ compiler. joachim99@2: # We add also $compiler_flags, to evetually add any --thread_safe or joachim99@2: # --exceptions flags (which is also tested when building an .a joachim99@2: # archive. joachim99@2: old_archive_cmds='$CC -Bstatic $compiler_flags -o $oldlib $oldobjs' joachim99@2: ;; joachim99@2: cxx) joachim99@2: # Compaq C++ joachim99@2: archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' joachim99@2: joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: hardcode_libdir_flag_spec='-rpath $libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: # joachim99@2: # There doesn't appear to be a way to prevent this compiler from joachim99@2: # explicitly linking system object files so we need to strip them joachim99@2: # from the output so that they don't get included in the library joachim99@2: # dependencies. joachim99@2: output_verbose_link_cmds='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' joachim99@2: ;; joachim99@2: insure) joachim99@2: if test "$with_gcc" = yes; then joachim99@2: # Insure++ together with gcc probably means also GNU ld joachim99@2: # only -whole-archive isn't supported joachim99@2: whole_archive_flag_spec="" joachim99@2: # and we can't use -nostdlib, because bloody insure has no way to joachim99@2: # output the linkline (-Zvm isn't working as documented), so we don't joachim99@2: # know the depending libs. So we hope, insure gets it right anyway. joachim99@2: archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' joachim99@2: export_dynamic_flag_spec='${wl}--export-dynamic' joachim99@2: output_verbose_link_cmds="" joachim99@2: fi joachim99@2: esac joachim99@2: ;; joachim99@2: lynxos*) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: m88k*) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: mvs*) joachim99@2: case $cc_basename in joachim99@2: cxx) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: netbsd*) joachim99@2: if test "$with_gcc" = no || test "$with_gnu_ld" = no; then joachim99@2: # This should only be triggered for NetBSD/a.out joachim99@2: # Add in C++ constructor/destructor support joachim99@2: if test -f /usr/pkg/lib/c++rt0/c++rt0.o.PIC; then joachim99@2: cppopts="/usr/pkg/lib/c++rt0/c++rt0.o.PIC" joachim99@2: elif test -f /usr/lib/c++rt0.o; then joachim99@2: cppopts="/usr/lib/c++rt0.o" joachim99@2: fi joachim99@2: archive_cmds='ld -Bshareable -o $lib '"$cppopts"' $libobjs $deplibs $linkopts' joachim99@2: fi joachim99@2: ;; joachim99@2: openbsd*) joachim99@2: if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then joachim99@2: # MM: OpenBSD 2.7 uses G++, but not GNU ld joachim99@2: archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' joachim99@2: archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' joachim99@2: old_archive_cmds="$old_archive_cmds~"'$RANLIB $oldlib' joachim99@2: hardcode_libdir_flag_spec='${wl}-R$libdir' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: whole_archive_flag_spec='${wl}-Bforcearchive' joachim99@2: remove_lgcc=yes joachim99@2: fi joachim99@2: ;; joachim99@2: osf3*) joachim99@2: if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then joachim99@2: allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' joachim99@2: archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' joachim99@2: else joachim99@2: case $cc_basename in joachim99@2: KCC) joachim99@2: # Kuck and Associates, Inc. (KAI) C++ Compiler joachim99@2: joachim99@2: # KCC will only create a shared library if the output file joachim99@2: # ends with ".so" (or ".sl" for HP-UX), so rename the library joachim99@2: # to its proper name (with version) after linking. joachim99@2: archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath,$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Archives containing C++ object files must be created using joachim99@2: # "CC -Bstatic", where "CC" is the KAI C++ compiler. joachim99@2: old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs' joachim99@2: joachim99@2: ;; joachim99@2: RCC) joachim99@2: # Rational C++ 2.4.1 joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: cxx) joachim99@2: allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' joachim99@2: archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: # joachim99@2: # There doesn't appear to be a way to prevent this compiler from joachim99@2: # explicitly linking system object files so we need to strip them joachim99@2: # from the output so that they don't get included in the library joachim99@2: # dependencies. joachim99@2: output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "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' joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: fi joachim99@2: ;; joachim99@2: osf4* | osf5*) joachim99@2: if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then joachim99@2: allow_undefined_flag=' -Wl,-expect_unresolved -Wl,\*' joachim99@2: no_undefined_flag=' -Wl,-expect_unresolved -Wl,\*' joachim99@2: archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' joachim99@2: else joachim99@2: case $cc_basename in joachim99@2: KCC) joachim99@2: # Kuck and Associates, Inc. (KAI) C++ Compiler joachim99@2: joachim99@2: # KCC will only create a shared library if the output file joachim99@2: # ends with ".so" (or ".sl" for HP-UX), so rename the library joachim99@2: # to its proper name (with version) after linking. joachim99@2: archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath,$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Archives containing C++ object files must be created using joachim99@2: # the KAI C++ compiler. joachim99@2: old_archive_cmds='$CC -o $oldlib $oldobjs' joachim99@2: ;; joachim99@2: RCC) joachim99@2: # Rational C++ 2.4.1 joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: cxx) joachim99@2: allow_undefined_flag=' -Wl,-expect_unresolved -Wl,\*' joachim99@2: no_undefined_flag=' -Wl,-expect_unresolved -Wl,\*' joachim99@2: archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -update_registry ${objdir}/so_locations -o $lib' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='-rpath $libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: # joachim99@2: # There doesn't appear to be a way to prevent this compiler from joachim99@2: # explicitly linking system object files so we need to strip them joachim99@2: # from the output so that they don't get included in the library joachim99@2: # dependencies. joachim99@2: output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "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' joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: fi joachim99@2: ;; joachim99@2: psos*) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: sco*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: sunos4*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # Sun C++ 4.x joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: lcc) joachim99@2: # Lucid joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: solaris*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # Sun C++ 4.2, 5.x and Centerline C++ joachim99@2: no_undefined_flag=' -ztext' joachim99@2: archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' joachim99@2: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ joachim99@2: $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' joachim99@2: joachim99@2: hardcode_libdir_flag_spec='-R$libdir' joachim99@2: hardcode_shlibpath_var=no joachim99@2: case $host_os in joachim99@2: solaris2.[0-5] | solaris2.[0-5].*) ;; joachim99@2: *) joachim99@2: # The C++ compiler is used as linker so we must use $wl joachim99@2: # flag to pass the commands to the underlying system joachim99@2: # linker. joachim99@2: # Supported since Solaris 2.6 (maybe 2.5.1?) joachim99@2: whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' joachim99@2: ;; joachim99@2: esac joachim99@2: link_all_deplibs=yes joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: # joachim99@2: # There doesn't appear to be a way to prevent this compiler from joachim99@2: # explicitly linking system object files so we need to strip them joachim99@2: # from the output so that they don't get included in the library joachim99@2: # dependencies. joachim99@2: output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' joachim99@2: joachim99@2: # Archives containing C++ object files must be created using joachim99@2: # "CC -xar", where "CC" is the Sun C++ compiler. This is joachim99@2: # necessary to make sure instantiated templates are included joachim99@2: # in the archive. joachim99@2: old_archive_cmds='$CC -xar -o $oldlib $oldobjs' joachim99@2: ;; joachim99@2: gcx) joachim99@2: # Green Hills C++ Compiler joachim99@2: archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' joachim99@2: joachim99@2: # The C++ compiler must be used to create the archive. joachim99@2: old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs' joachim99@2: ;; joachim99@2: *) joachim99@2: # GNU C++ compiler with Solaris linker joachim99@2: if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then joachim99@2: if $CC --version | egrep -v '^2\.7' > /dev/null; then joachim99@2: archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ joachim99@2: $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" joachim99@2: else joachim99@2: # g++ 2.7 appears to require `-G' NOT `-shared' on this joachim99@2: # platform. joachim99@2: archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ joachim99@2: $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' joachim99@2: joachim99@2: # Commands to make compiler produce verbose output that lists joachim99@2: # what "hidden" libraries, object files and flags are used when joachim99@2: # linking a shared library. joachim99@2: output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" joachim99@2: fi joachim99@2: joachim99@2: hardcode_libdir_flag_spec='${wl}-R $wl$libdir' joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: tandem*) joachim99@2: case $cc_basename in joachim99@2: NCC) joachim99@2: # NonStop-UX NCC 3.20 joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: unixware*) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: vxworks*) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: *) joachim99@2: # FIXME: insert proper C++ library support joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: joachim99@2: ## Compiler Characteristics: PIC flags, static flags, etc joachim99@2: joachim99@2: # We don't use cached values here since only the C compiler joachim99@2: # characteristics should be cached. joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ac_cv_prog_cc_shlib= joachim99@2: ac_cv_prog_cc_wl= joachim99@2: ac_cv_prog_cc_static= joachim99@2: ac_cv_prog_cc_no_builtin= joachim99@2: ac_cv_prog_cc_can_build_shared=$can_build_shared joachim99@2: joachim99@2: ac_cv_prog_cc_pic_works= joachim99@2: ac_cv_prog_cc_static_works= joachim99@2: joachim99@2: if test "$with_gcc" = yes; then joachim99@2: ac_cv_prog_cc_wl='-Wl,' joachim99@2: ac_cv_prog_cc_static='-static' joachim99@2: joachim99@2: case $host_os in joachim99@2: aix*) joachim99@2: # All AIX code is PIC. joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: # AIX 5 now supports IA64 processor joachim99@2: lt_cv_prog_cc_static='-Bstatic' joachim99@2: else joachim99@2: lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' joachim99@2: fi joachim99@2: ;; joachim99@2: amigaos*) joachim99@2: # FIXME: we need at least 68020 code to build shared libraries, but joachim99@2: # adding the `-m68020' flag to GCC prevents building anything better, joachim99@2: # like `-m68040'. joachim99@2: ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' joachim99@2: ;; joachim99@2: beos* | irix5* | irix6* | osf3* | osf4* | osf5*) joachim99@2: # PIC is the default for these OSes. joachim99@2: ;; joachim99@2: cygwin* | mingw* | os2*) joachim99@2: # This hack is so that the source file can tell whether it is being joachim99@2: # built for inclusion in a dll (and should export symbols for example). joachim99@2: ac_cv_prog_cc_pic='-DDLL_EXPORT' joachim99@2: ;; joachim99@2: darwin* | rhapsody*) joachim99@2: # PIC is the default on this platform joachim99@2: # Common symbols not allowed in MH_DYLIB files joachim99@2: lt_cv_prog_cc_pic='-fno-common' joachim99@2: ;; joachim99@2: *djgpp*) joachim99@2: # DJGPP does not support shared libraries at all joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ;; joachim99@2: sysv4*MP*) joachim99@2: if test -d /usr/nec; then joachim99@2: ac_cv_prog_cc_pic=-Kconform_pic joachim99@2: fi joachim99@2: ;; joachim99@2: *) joachim99@2: ac_cv_prog_cc_pic='-fPIC' joachim99@2: ;; joachim99@2: esac joachim99@2: else joachim99@2: case $host_os in joachim99@2: aix4* | aix5*) joachim99@2: # All AIX code is PIC. joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: # AIX 5 now supports IA64 processor joachim99@2: lt_cv_prog_cc_static='-Bstatic' joachim99@2: else joachim99@2: lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' joachim99@2: fi joachim99@2: ;; joachim99@2: chorus*) joachim99@2: case $cc_basename in joachim99@2: cxch68) joachim99@2: # Green Hills C++ Compiler joachim99@2: # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: dgux*) joachim99@2: case $cc_basename in joachim99@2: ec++) joachim99@2: ac_cv_prog_cc_pic='-KPIC' joachim99@2: ;; joachim99@2: ghcx) joachim99@2: # Green Hills C++ Compiler joachim99@2: ac_cv_prog_cc_pic='-pic' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: freebsd*) joachim99@2: # FreeBSD uses GNU C++ joachim99@2: ;; joachim99@2: hpux9* | hpux10* | hpux11*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: ac_cv_prog_cc_wl='-Wl,' joachim99@2: ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" joachim99@2: ac_cv_prog_cc_pic='+Z' joachim99@2: ;; joachim99@2: aCC) joachim99@2: ac_cv_prog_cc_wl='-Wl,' joachim99@2: ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" joachim99@2: ac_cv_prog_cc_pic='+Z' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: irix5* | irix6*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: ac_cv_prog_cc_wl='-Wl,' joachim99@2: ac_cv_prog_cc_static='-non_shared' joachim99@2: ac_cv_prog_cc_pic='-KPIC' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: linux*) joachim99@2: case $cc_basename in joachim99@2: KCC) joachim99@2: # KAI C++ Compiler joachim99@2: ac_cv_prog_cc_wl='--backend -Wl,' joachim99@2: ac_cv_prog_cc_pic='-fPIC' joachim99@2: ac_cv_prog_cc_static='-Bstatic' joachim99@2: ;; joachim99@2: cxx) joachim99@2: # Compaq C++ joachim99@2: # Make sure the PIC flag is empty. It appears that all Alpha joachim99@2: # Linux and Compaq Tru64 Unix objects are PIC. joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ac_cv_prog_cc_static='-non_shared' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: lynxos*) joachim99@2: ;; joachim99@2: m88k*) joachim99@2: ;; joachim99@2: mvs*) joachim99@2: case $cc_basename in joachim99@2: cxx) joachim99@2: ac_cv_prog_cc_pic='-W c,exportall' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: netbsd*) joachim99@2: ;; joachim99@2: osf3* | osf4* | osf5*) joachim99@2: case $cc_basename in joachim99@2: KCC) joachim99@2: ac_cv_prog_cc_wl='--backend -Wl,' joachim99@2: ;; joachim99@2: RCC) joachim99@2: # Rational C++ 2.4.1 joachim99@2: ac_cv_prog_cc_pic='-pic' joachim99@2: ;; joachim99@2: cxx) joachim99@2: # Digital/Compaq C++ joachim99@2: ac_cv_prog_cc_wl='-Wl,' joachim99@2: # Make sure the PIC flag is empty. It appears that all Alpha joachim99@2: # Linux and Compaq Tru64 Unix objects are PIC. joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ac_cv_prog_cc_static='-non_shared' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: psos*) joachim99@2: ;; joachim99@2: sco*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: ac_cv_prog_cc_pic='-fPIC' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: solaris*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # Sun C++ 4.2, 5.x and Centerline C++ joachim99@2: ac_cv_prog_cc_pic='-KPIC' joachim99@2: ac_cv_prog_cc_static='-Bstatic' joachim99@2: ac_cv_prog_cc_wl='-Qoption ld ' joachim99@2: ;; joachim99@2: gcx) joachim99@2: # Green Hills C++ Compiler joachim99@2: ac_cv_prog_cc_pic='-PIC' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: sunos4*) joachim99@2: case $cc_basename in joachim99@2: CC) joachim99@2: # Sun C++ 4.x joachim99@2: ac_cv_prog_cc_pic='-pic' joachim99@2: ac_cv_prog_cc_static='-Bstatic' joachim99@2: ;; joachim99@2: lcc) joachim99@2: # Lucid joachim99@2: ac_cv_prog_cc_pic='-pic' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: tandem*) joachim99@2: case $cc_basename in joachim99@2: NCC) joachim99@2: # NonStop-UX NCC 3.20 joachim99@2: ac_cv_prog_cc_pic='-KPIC' joachim99@2: ;; joachim99@2: *) joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: unixware*) joachim99@2: ;; joachim99@2: vxworks*) joachim99@2: ;; joachim99@2: *) joachim99@2: ac_cv_prog_cc_can_build_shared=no joachim99@2: ;; joachim99@2: esac joachim99@2: fi joachim99@2: joachim99@2: case "$host_os" in joachim99@2: # Platforms which do not suport PIC and -DPIC is meaningless joachim99@2: # on them: joachim99@2: *djgpp*) joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ;; joachim99@2: *) joachim99@2: ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: joachim99@2: # Figure out "hidden" C++ library dependencies from verbose joachim99@2: # compiler output whening linking a shared library. joachim99@2: cat > conftest.$ac_ext <&5; then joachim99@2: # Parse the compiler output and extract the necessary joachim99@2: # objects, libraries and library flags. joachim99@2: joachim99@2: # Sentinel used to keep track of whether or not we are before joachim99@2: # the conftest object file. joachim99@2: pre_test_object_deps_done=no joachim99@2: joachim99@2: for p in `eval $output_verbose_link_cmds`; do joachim99@2: joachim99@2: case $p in joachim99@2: joachim99@2: -L* | -R* | -l*) joachim99@2: # Some compilers place space between "-{L,R}" and the path. joachim99@2: # Remove the space. joachim99@2: if test $p = "-L" \ joachim99@2: || test $p = "-R"; then joachim99@2: prev=$p joachim99@2: continue joachim99@2: else joachim99@2: prev= joachim99@2: fi joachim99@2: joachim99@2: if test "$pre_test_object_deps_done" = no; then joachim99@2: case $p in joachim99@2: -L* | -R*) joachim99@2: # Internal compiler library paths should come after those joachim99@2: # provided the user. The postdeps already come after the joachim99@2: # user supplied libs so there is no need to process them. joachim99@2: if test -z "$compiler_lib_search_path"; then joachim99@2: compiler_lib_search_path="${prev}${p}" joachim99@2: else joachim99@2: compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}" joachim99@2: fi joachim99@2: ;; joachim99@2: # The "-l" case would never come before the object being joachim99@2: # linked, so don't bother handling this case. joachim99@2: esac joachim99@2: else joachim99@2: add="${prev}${p}" joachim99@2: if test "x$remove_lgcc" = "xyes" ; then joachim99@2: case "$add" in joachim99@2: -lgcc ) add="" ;; joachim99@2: esac joachim99@2: fi joachim99@2: if test -n "$add" ; then joachim99@2: if test -z "$postdeps"; then joachim99@2: postdeps="$add" joachim99@2: else joachim99@2: postdeps="${postdeps} ${add}" joachim99@2: fi joachim99@2: fi joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: *.$objext) joachim99@2: # This assumes that the test object file only shows up joachim99@2: # once in the compiler output. joachim99@2: if test "$p" = "conftest.$objext"; then joachim99@2: pre_test_object_deps_done=yes joachim99@2: continue joachim99@2: fi joachim99@2: joachim99@2: if test "$pre_test_object_deps_done" = no; then joachim99@2: if test -z "$predep_objects"; then joachim99@2: predep_objects="$p" joachim99@2: else joachim99@2: predep_objects="$predep_objects $p" joachim99@2: fi joachim99@2: else joachim99@2: if test -z "$postdep_objects"; then joachim99@2: postdep_objects="$p" joachim99@2: else joachim99@2: postdep_objects="$postdep_objects $p" joachim99@2: fi joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: *) ;; # Ignore the rest. joachim99@2: joachim99@2: esac joachim99@2: done joachim99@2: joachim99@2: # Clean up. joachim99@2: rm -f a.out joachim99@2: else joachim99@2: echo "ltcf-cxx.sh: error: problem compiling test program" joachim99@2: fi joachim99@2: joachim99@2: $rm -f confest.$objext joachim99@2: joachim99@2: if test "x$skip_need_lc_check" = "xyes" ; then joachim99@2: need_lc=no joachim99@2: else joachim99@2: case " $postdeps " in joachim99@2: *" -lc "*) need_lc=no ;; joachim99@2: *) need_lc=yes ;; joachim99@2: esac joachim99@2: fi